An activity of a process flow can be overridden by another activity during the execution of the process flow. For example, let's assume the following process flow:



In the above figure, the process flow uses EvalXform_ExcelSchema. You can override this activity with another schema activity, for example, EvalXform_Text Schema, during the execution of the process flow. In this case, EvalXform_TextSchema is executed during the execution of the process flow.

This functionality is used when the actual activity to be executed is decided at the execution time, not at the design time of the process flow. For example, in a process flow that handles data coming in various formats, you have to first add the schema activity for each data format and then route the data to an appropriate format using decision node. This results in the process flow being bulky and unmanageable. At times, you may even need to design one process flow for each data format. Now, this problem can be overcome by using the same process flow with a different schema activity. You can simply override the EvalXform_ExcelSchema with another schema of your choice. For details on the type of activities that can be overridden, click here.

You can override an activity in a process flow by using one of the following methods:

Overriding an activity using Custom Plugin

You can override an activity by using a custom plugin activity just before the activity that needs to be overridden by another activity. Consider the below process flow:



As shown in the figure, the EvalXform_CustomPlugin activity is used just before the EvalXform_ExcelSchema activity.

The setActivityParameter ( ) API is used to override the activity.

The sample Java code to override a schema activity is:

context.setActivityParameter(ActivityName,"schemaTypedId", activityType + ":" + dynamicActivityID);

For all other activities, overriding is done using the Java code:

context.setActivityParameter(activityName,"TypedId",activityType + ":" + dynamicActivityID);

where,

<activityName> is the name of the activity to be overridden.

<activityType> is the type of activity that will override the existing activity. For details on the type of activities that can be overridden, click here.

<dynamicActivityID> is the entity Id of the activity that will override the existing activity. To know the Entity Id of an activity, in the Manage Activity screen, click > View.

Overriding an activity using put-context-var

You can override an activity using put-context-var action just before the activity that needs to be overridden by another activity. To override an activity:

  1. In the Process Designer, in the Repository View panel, expand Action
  2. Click and drag put-context-var action to the Graph Canvas area just before the activity that is to be overridden.
  3. Connect the put-context-var action to the activity.

  4. Right-click put-context-var and click View Properties. Its properties are displayed in the Properties Panel in the Bottom Pane.



  5. Click Edit in the Context Variables.
  6. On the Edit Context Variables window, click .
  7. Select the activity to be overridden from the Activity Name.
  8. Select SchemaTypedId (for Schema activity) or TypedId (for all other activities) from the Variable Name.
  9. Type the Activity Type and the Entity Id of the activity that will override the existing activity in the following format in the Variable Value.
    <Activity_Type>: <EntitiyID>
    For example: TextSchema: 192168001006115537684214000004

    To know the Entity Id of an activity, in the Manage Activity screen, click > View.

     


  10. Click Done to close the Context Variable Information window. This takes the control back to the Edit Context Variables window. The newly created variable is added to the list of existing context variables.
  11. Click Done to close Edit Context Variables window and return to the Process Designer.
  12. Save the process flow and exit from the Process Designer.

Activities that can be overridden

You can override the following activities in a process flow. 

Source Activity

Any type of source activity can be overridden by another type of source activity. For example, a File source activity can be overridden by an FTP source activity. The types of source activities that can be overridden and their TypedId are:

Source Type

Activity Type

Advanced Database Source

AdvancedDatabaseSource

Database Source

DatabaseSource

File Source

FileSource

FTP Source

FtpSource

HTTP Source

HttpSource

JMS Source

JmsSource

LAN File Source

LanFileSource

Mail Source

MailSource

WebDAV Source

WebdavSource

Target Activity

Any type of target activity can be overridden by another type of target activity. For example, a File target activity can be overridden by FTP target activity. The types of target activities that can be overridden and their TypeId are: 

Target Type

Activity Type

Advanced Database Target

AdvancedDatabaseTarget

Database Target

DatabaseTarget

File Target

FileTarget

FTP Target

FtpTarget

HTTP Target

HttpPost

JMS Target

JmsTarget

LAN File Target

LanFileTarget

Mail Target

MailTarget

WebDAV Target

WebdavTarget

Schema Activity

Any type of schema activity can be overridden by another type of schema activity. For example, a Text schema activity can be overridden by an Excel schema activity. The types of schema activities that can be overridden and their schema TypedId are:

Schema Type

Activity Type

Excel Schema

ExcelSchema

Text Schema

TextSchema

XML Schema

XMLSchema

EDI Schema

EDISchema

Advanced Positional Schema

AdvancePositionalSchema

Positional Schema

PositionalSchema

 Polling Activity

Any type of polling activity can be overridden by another type of polling activity. For example, a File polling activity can be overridden by a Mail polling activity. The types of polling activities that can be overridden and their TypeId are:

Possible Polling Type

Activity Type

Database Polling

DatabasePollingService

File Polling

FilePollingService

FTP Polling

FtpPollingService

Mail Polling

MailPolling

Other Activities

All other types of activities can be overridden by exactly the same type of activity. For example, a Custom Plugin activity can be overridden by another Custom Plugin activity only. Similarly, a Data Mapper activity can be overridden by another Data Mapper activity only. All other types of activities that can be overridden and their TypeId are:

Activity

Activity Type

Data Mapping

DataMapping

Record to Record

ScriptedRecord2RecordTransformer

Custom Plugin

CustomPlugin

Human Workflow

HumanInteraction

Context Download

ContextDownload

Context Upload

ContextUpload

MIME Message

Decoder

MessageExtractor

Encoder

MessageComposer

Custom Report

IndigoReport

Native Call

NativeCall

Mail Notification

MailNotification

Web Service

WsMessage Call

WsMessageCall

WsRpc Call

WsRpcCall


Overriding subject and body of email sent for a Human Workflow Task

The subject of emails sent when a Human Workflow task is created/updated, is already predefined in the code. Now, you can override this subject by using put-context-var action.

To override the email subject:

  1. In the Process Designer, in the Repository View panel, expand Action.
  2. Click and drag put-context-var action to the Graph Canvas area before the human workflow task whose email subject is to be overridden.
  3. Connect the put-context-var action to the task.

  4. Right-click the put-context-var and click View Properties. Its properties are displayed in the Properties Panel in the Bottom Pane.
  5. Click Edit in the Context Variables.
  6. On the Edit Context Variables window, click .
  7. Select the task to be overridden from the Activity Name. All the variables of the selected task are listed in the Variable Name.
  8. Select emailSubject from the Variable Name.
  9. Type the new email subject that you want to display in the Variable Value. You can also define the subject as extracted from a variable, by entering $$ variable name $$ in the Variable Value.



  10. Click Done to close the Context Variable Information window. This takes the control back to the Edit Context Variables window. The newly created variable is added to the list of existing context variables.
  11. Click Done to close Edit Context Variables window and return to the Process Designer.
  12. Save the process flow and exit from the Process Designer.
    When you execute this process flow, and an email for a new task is sent, then 'New Task' is appended in the email subject. This is pre-defined in the code and is displayed when you override the email subject. It is subject to change, based on the action performed. If an existing task is deferred, then 'Deferred Task' is appended.

    Similarly, you can dynamically override the first line of the email subject.

Overriding Assignee User of a Human Workflow Task

You can dynamically override the assignee (user to whom the task is assigned) of a Human Workflow activity during the execution of a process flow using put-context-var action.

To override the user:

  1. In the Process Designer, in the Repository View panel, expand Action.
  2. Click and drag put-context-var action to the Graph Canvas area before the human workflow task whose assignee user is to be overridden.
  3. Connect the put-context-var action to the task.
  4. Right-click put-context-var and click View Properties. Its properties are displayed in the Properties Panel in the Bottom Pane.
  5. Click Edit in the Context Variables.
  6. On the Edit Context Variables window, click .
  7. Select the task to be overridden from the Activity Name. All the variables of the selected task are listed in the Variable Name
  8. Select hiReceiverUsers from the Variable Name.
  9. Type the User Id of the user to whom you want to assign the Human Workflow task in the Variable Value.

  10. Click Done to close the Context Variable Information window. This takes the control back to the Edit Context Variables. The newly created variable is added to the list of existing context variables.
  11. Click Done to close the Edit Context Variables window and return to Process Designer.
  12. Save the process flow and exit from Process Designer. When you execute this process flow, the process will be assigned to the user to whom it was originally assigned.

Overriding Assignee Role of a Human Workflow Task

You can dynamically override the assignee (business user role to whom the task is assigned) of a Human Workflow activity during the execution of a process flow using put-context-var action. 

  1. In the Process Designer, in the Repository View panel, expand Action.
  2. Click and drag put-context-var action to the Graph Canvas area before the human workflow task whose assignee role is to be overridden.
  3. Connect the put-context-var action to the task.
  4. Right-click put-context-var and click View Properties. Its properties are displayed in the Properties Panel in the Bottom Pane.
  5. Click Edit in the Context Variables.
  6. On the Edit Context Variables window, click .
  7. Select the task to be overridden from the Activity Name. All the variables of the selected task are listed in the Variable Name.
  8. Select hiReceiverRoles from the Variable Name.
  9. Type the Type Id of the role to whom you want to assign the Human Workflow task in the Variable Value.

  10. Click Done to close the Context Variable Information window. This takes the control back to the Edit Context Variables. The newly created variable is added to the list of existing context variables.
  11. Click Done to close the Edit Context Variables window and return to the Process Designer.
  12. Save the process flow and exit from the Process Designer. When you execute this process flow, the process will be assigned to the role to whom it was originally assigned.

 

  • No labels