Managing Workflows

This chapter describes how to use the Workflow Manager to start, stop, and view workflow instances and to manage schema groups.

This chapter covers the following topics:

Viewing Workflow Status

You can view all the status of all public workflow schemas and all private workflow schemas that you created. This means that you can see how many instances of those schemas are running, as well as the status of each instance.

To view overall status of the workflows

The Workflow Manager displays the overall status information for the workflows, for the currently selected schema group (All in this case).

the picture is described in the document text

Each row corresponds to a workflow schema. The Instances column indicates how many instances of this workflow schema are currently running, if any. The Status column uses the following color codes:

Green The workflow schema is live and you may execute it, creating a workflow instance.
Red The workflow schema is archived and cannot be executed.
Yellow There is a data error or other fault within this schema.

To specify which workflow schemas to display

  1. To see all workflow schemas, select All in the Schema Groups drop-down list. Then click View.

  2. To see a subset of the schemas, select a group in the Schema Groups drop-down list. Then click View.

To refresh the display

  1. Click Refresh.

To view the currently running instances of a schema

  1. If the workflow schema is not visible, use the drop-down menu and select the name of a schema group to which it belongs. Or select All.

  2. Click the Instances link in the row corresponding to that workflow.

    The Workflow Manager lists all the instances of that schema that are currently running.

    the picture is described in the document text

  3. When you are done, click Back.

    See also

    “Logging into the Workflow Manager”

    “Viewing the Workflow Process Log”

Starting Workflow Instances

You can start an instance of any public workflow schema or any private workflow schema that you created.

To start a workflow instance

  1. If the workflow schema is not visible, use the drop-down menu and select the name of a schema group to which it belongs. Or select All.

  2. Click Start next to the schema that you want to start.

    The Workflow Engine starts an instance of the workflow and increments the number of instances in the Instances column by one.

    Note: Although you can generally run as many instances of a workflow as you want at the same time, be careful not to activate conflicting processes and tasks.

    See also

    “Logging into the Workflow Manager”

    “Stopping Workflow Instances”

    “Creating Workflows”

Scheduling Workflow Instances

If you are the owner of a workflow, you can schedule an instance to start at a specific time or times. If you are not the owner, you cannot schedule it, although you can start it manually, as described in “Starting Workflow Instances”.

To schedule a workflow instance

  1. If the workflow schema is not visible, use the drop-down menu and select the name of a schema group to which it belongs. Or select All.

  2. Click Schedule in the row corresponding to that workflow.

    The system displays the Schema Scheduler page, which lists all the times when Workflow Engine will start an instance of this schema.

    the picture is described in the document text

  3. Click Add.

    The system displays the following page.

    the picture is described in the document text

  4. In the Schedule Schema drop-down list, select the option that specifies how often to start an instance of this workflow:

    • Daily

    • Weekly

    • Monthly

    • Once

    • At Startup (This option launches the workflow whenever the Web server is started.)

    • Periodic (in this option, you can start a workflow at periodic intervals (measured in seconds, minutes, hours, days, weeks, months, or years. Note that you cannot choose the starting time.)

      Depending on the choice you make here, the system displays additional scheduling options in the bottom part of the page.

  5. In the rest of the page, finish specifying the schedule.

  6. Click OK.

To unschedule a workflow instance

  1. On the Workflow Management page, click Schedule in the row corresponding to that workflow.

    The system displays the Schema Scheduler page. This page displays one row for each scheduling entry for this workflow.

  2. Click the row corresponding to the scheduling entry you want to remove.

  3. Click Remove.

    See also

    “Starting Workflow Instances”

    “Stopping Workflow Instances”

Stopping Workflow Instances

You can stop any workflow instance that you started. You cannot stop a workflow instance started by another user.

To stop a workflow instance

  1. If the workflow schema is not visible, use the drop-down menu and select the name of a schema group to which it belongs. Or select All.

  2. Click the number in the Instances column that corresponds to that workflow.

    The system lists all the instances of that schema.

    the picture is described in the document text

    Note: Instances that show in red are instances of Fail-To-Execute Step steps. For more information, see “Fail-To-Execute Step”.

  3. Click Terminate next to the instance that you want to stop.

  4. Click OK.

    The instance is stopped and is removed from the list of instances.

    Note: Terminate stops only the workflow instance itself. It does not cancel any work that the instance may have initiated (such as tasks that were sent or requests placed in the Simulation Engine or Business Logic Engine queues). These items must be cancelled manually.

    See also

    “Creating Workflows” “Starting Workflow Instances”

    “Scheduling Workflow Instances”

Creating or Editing a Schema Group

Schema groups affect only the display within the Workflow Manager. A schema can belong to multiple groups. Also, a schema group can be public (viewable by all users who log into Workflow Manager) or private (viewable only by you).

You can edit any schema group that you created; this has no effect on the workflow schemas themselves. You cannot edit schema groups created by other users.

To create or edit a schema group

  1. On the Workflow Management page, do one of the following:

    • To create a new schema group, click New at the top of this page.

    • To edit a schema group, select the group from the drop-down list at the top of this page. Then click Modify.

      The Workflow Manager displays the following page:

    the picture is described in the document text

  2. For Name, type a unique name for this schema group.

  3. For Description, type an optional description.

  4. Specify the workflow schemas to include in this group. To do so, move schemas from the left list to the right list.

  5. For Permission, click Public or Private, depending on whether you want other users to be able to see this schema group.

  6. Click .

    See also

    “Creating Workflows”

Deleting a Schema Group

You can delete any schema group that you created; this has no effect on the workflow schemas themselves. You cannot delete schema groups created by other users.

To create or edit a schema group

  1. On the Workflow Management page, select the group from the drop-down list at the top of this page.

  2. Click Delete.

  3. Click OK to confirm the deletion.

Viewing the Workflow Process Log

The workflow process log displays information on all the workflow instances that have run or that are running.

To view the process log

  1. On the bottom of the Workflow Management page, click Process Log.

    The Process Log page appears.

    the picture is described in the document text

To filter process log entries

  1. Select the required filter from the View Processes drop-down menu.

  2. Click View.

    The filtered processes are shown.

    See also:

    “Viewing Workflow Status”

Recovery and the Workflow Engine

Each time it starts up, the Workflow Engine checks to see if there are any workflow instances that are running, that is, an instance whose status is not completed or terminated. For each instance that is currently running, the engine performs a recovery procedure.

An instance is considered to be in mid-step and therefore running, even when it is between steps. The current step is the last step that was running when the crash happened.

For information on standard workflow messages, see “Tips and Troubleshooting”.

Web Services for Demantra Workflows

A Demantra workflow can be called as a web service. There are four methods available (see Web Service Methods below for detailed explanations of each):

Note: The workflow web service runs only on the Oracle Application Server and WebLogic.

Web Service Architecture

Demantra's Web Service is developed to align with the Oracle Application Server WS architecture. The following diagram illustrates the overall architecture of WS-Security architecture for the Oracle Web service stack.

the picture is described in the document text

Web Services Library Overview

The following tables identify the methods and parameter types for calling Demantra web services.

Name: Demantra Workflow Web Service name=”MSC_WS_DEMANTRA_WORKFLOW”
Description: Provides web services interface for the activation/termination and monitoring of Workflow processes.
WSDL: http://localhost/demantra/MSC_WS_DEMANTRA_WORKFLOWSoapHttpPort
Last Modified: January 2008

Class Descriptions

Dictionary Description: This class contains an implementation of a Dictionary, which hold an array of Entries. Each Entry contains Key, Value, and Type. This Dictionary will be used for the WF Process, and will be a part of a Web Service implementation.
  Type: Complex Type
  Required: No
  Default: No
Entry Description: This class represents an Entry object that contains a Key that points to a specific Value. This object will be used in the WF Process as part of the Web Service implementation, and will hold Attributes, Levels, Members, Population, Dates, etc. Always assume case sensitivity.
  Type: Complex Type
  Required: No
  Default: No
key Description: The key is a member attribute of the Entry it is a unique identifier (hash).
  Type: string
  Required: Yes
  Default: No
numericValue Description: A numeric value variable that may be contained in the Entry; will usually hold level attribute values.
  Type: Double
  Required: No
  Occurrence: Minimum 0 Maximum 1
populationValue Description: A population descriptor that may be contained in the Entry.
  Type: Population
  Required: No
  Occurrence: Minimum 0 Maximum 1
dateValue Description: A date value that may be contained in the Entry; will usually hold level attribute values.
  Type: dateTime
  Required: No
  Occurrence: Minimum 0 Maximum 1
stringValue Description: A string value that may be contained in the Entry; will usually hold level attribute values.
  Type: String
  Required: No
  Occurrence: Minimum 0 Maximum 1
booleanValue Description: Boolean value used for the internal parameter in our application which needed inside the process (e.g. - a flag that indicates whether we need to create new combinations, in new member step)
  Type: Boolean
  Required: No
  Occurrence: Minimum 0 Maximum 1
Population Description: This class holds a Population object that will be used for the Web Service implementation. The Population contains Dates (range from-until) and Filters (level-members).
  Type: Complex Type
  Required: No
  Default: No
fromDate Description: This element is the start date of the population date range.
  Type: dateTime
  Required: Yes
  Default: No
untilDate Description: This element is the end date of the population date range.
  Type: dateTime
  Required: Yes
  Default: No
levelIds Description: This element represents the array of level ids that define the dimensions of the population. Each element in this array corresponds to LevelMembers held in memberIds.
  Type: int
  Required: Yes
  Occurrence: 1 to unbound
memberIds Description: In this complex object we finally hold the members of the population related to selected population dimensionality.
  Type: LevelMembers
  Required: Yes
  Occurrence: 1 to unbound
LevelMembers Description: This class holds an array of Member Ids that will be used for the Web Service implementation - these Members related to a Level and are part of a Population Object.
  Type: Complex Type
  Required: No
  Default: No
members Description: Array of Member Ids that will be used for the Web Service implementation - these Members related to a Level and are part of a Population Object.
  Type: int
  Required: Yes
  Occurrence: 1 to unbound

Method Details

RunWFProcess

Description: Run a Workflow Schema. This will be the same like Starting a WF Process via the Workflow Page. WF Schema Name is Case Sensitive.
Access: remote
Return Type: long
Output: None
Implemented In: com.demantra.common.webServices.workflow.WorkfloServices
Arguments:
schemaName
Description: The name of the Workflow schema that is requested for remote execution.
Type: String
Required: Yes
Default: No (Case sensitive)
runSynch
Description: Specifies whether the workflow schema is to be executed is synchronized or asynchronized mode.
Type: Boolean
Required: Yes
Default: No

RunWFProcessWithContext

Description: Retrieve a query object of the posts to blogs specified. Maximum of 50 records returned. WF Schema Name is Case Sensitive.
Access: remote
Return Type: long
Output: false
Implemented In: com.demantra.common.webServices.workflow.WorkfloServices
Arguments:
schemaName
Description: The name of the Workflow schema that is requested for remote execution.
Type: String
Required: Yes
Default: No (Case Sensitive)
dictionary
Description: This dictionary contains execution context parameters for the Workflow. Entry/Parameters are case sensitive.
Type: Dictionary
Required: Yes
Default: No
runSynch
Description: Specifies whether the workflow schema is to be executed is synchronized or asynchronized mode.
Type: boolean
Required: Yes
Default: No

GetWFProcessStatus

Description: Returns the current Status and Step Name of the WF Process. e.g. - 1. Process Active [ImportSKU]. 2. Process Terminated [RunWS]. 3. Process Completed [ExportSKU].
Access: remote
Return Type: String
Output: false
Implemented In: com.demantra.common.webServices.workflow.WorkfloServices
Arguments:
processId
Description: A parameter that identifies the workflow process that requires monitoring.
Type: long
Required: Yes
Default: No

TerminateWFProcess

Description: Terminate the current (identified by process ID) Active WF Process..
Access: remote
Return Type: No
Output: false
Implemented In: com.demantra.common.webServices.workflow.WorkfloServices
Arguments:
processId
Description: A parameter that identifies the workflow process that requires monitoring.
Type: long
Required: Yes
Default: No

Integration with JAAS

OracleAS Web Services provides an implementation of Java Authentication and Authorization Service (JAAS) for J2EE applications that is fully integrated with J2EE declarative security. This allows Demantra to take advantage of the JAAS constructs such as principal-based security and pluggable login modules. OracleAS Web Services Security provides out-of-the-box JASS authentication login modules that allow J2EE applications running on OracleAS Web Services to leverage the central security services of Oracle Identity Management.

The JAAS Provider ensures secure access to and execution of Java applications, and integration of Java-based applications with Oracle Application Server Single Sign-On.

Demantra has implemented a custom login module that is deployed in the OracleAS.

Configuring the Security Provider of the Application Server

Demantra has implemented a custom login module that is deployed in the OracleAS. The following procedure configures the application server to use this login module:

  1. Connect to Oracle Enterprise Manager.

  2. Deploy Demantra

  3. Define Security Provider as follows:

    • Select – 'Administration' -> 'Security Providers' (by Go to Task) -> 'demantra' application -> edit (demantra) -> 'Change Security Provider'.

    • In the Drop Down of 'Security Provider Type', select 'Custom Security Provider'.

    • In the 'JAAS Login Module Class' field, set 'com.demantra.common.authentication.DemantraLoginModule'.

    • Click OK.

      Note: This step can be done only through a deployment of the Demantra application

  4. Return to the Home Page and select 'Web Service'.

    • If no web services are found, open the link of the WF Web Service: http://(ROOT)/demantra/MSC_WS_DEMANTRA_WORKFLOWSoapHttpPort

    • Then refresh the Enterprise Manager page.

    • Click on the link: MSC_WS_DEMANTRA_WORKFLOWSoapHttpPort.

    • Select 'Administration' -> 'Enable/Disable Features'

    • Move 'Security' to the 'Enabled Features' box and then click OK.

    • Make sure that the 'Security' Feature is marked as Enabled.

  5. On the same page, select the 'Edit Configuration' icon of the 'Security' Feature, Press the 'Inbound Policies' button, and in the 'Authentication' tab, mark the checkbox 'Use Username/Password Authentication' and select 'Password Type' = 'Plain Text'. Click OK.

  6. Test the Workflow Web Service by providing User Name & Password in the WS-Security section.

Details of the Demantra custom login module

Location: package com.demantra.common.authentication;

DemantraLoginModule.java

Methods