Workflow |
Some process workflows comprise multiple, alternate workflow options and manual intervention is required to determine the suitable course of action. The Process Platform XForms can be a part of such workflows, where XForms can be used as the pages where users specify their preferences. In such XForms, the Workflow object is available directly on the XForm, which helps to control the Workflow object.
The properties and methods associated with the Workflow object define its behavior. The following XForms-related properties and methods can be accessed with the UI element to which the Workflow library is attached.
Table 1. List of Properties
Property |
Description |
---|---|
commitTask |
DEPRECATED. Use enableActionButton(actionType) and disableActionButton(actionType) instead. It denotes the Commit Task button on the task bar of an XForm that participates in workflows.The following methods are accessible from the commitTask property:
|
taskView |
It denotes the view of the opened task. This contain the following methods:
|
Table 2. List of Methods
Method |
Description |
---|---|
claimTask() |
This method claims the task. |
completeTask() |
This method completes the task for which an XForm is a part of the workflow. |
disableActionButton(actionType) |
This method disables the action button for the specified action type. The possible values of the actionType are:
|
displayTaskButton(sActionType,bShown) |
This method shows/hides the specified action type button in the task toolbar. It takes the following parameters:
|
enableActionButton(actionType) |
This method enables the action button for the specified action type. The possible values of the actionType are:
|
getAssignee() |
This method returns the display name of the user to whom the task is assigned. If the task is unassigned, this method returns an empty string. |
getAssigneeDN() |
This method returns the DN of the user to whom the task is assigned. If the task is unassigned, this method returns an empty string. |
getActivityFormId() |
This method returns the ID of Activity form; both in Case Activity View and BPM Activity View. |
getActivityName() |
This method returns the name of the Activity. This is same as the subject/description that is entered by the user in the BPM/Case Modeler for an activity. |
getCaseActivityId() |
This method returns the Activity ID of the current case activity. Returns null if the current activity is not a case activity. |
getCaseInstanceId() |
This method returns the Case Instance ID if the task is processed directly from a Case Model or if the root source is a Case Model. It also |
getCaseOverviewFormId() |
This method returns the ID of the Case Overview Form. It returns null if the case overview is not loaded. This may occur as the Case Overview Form is loaded only when the Case Overview Form tab is clicked. |
getDeliveryDate() |
This method returns the delivery date. |
getMessageId() |
Ths method returns the message ID. |
getMessageStatus() |
This method returns the message status. |
getProcessInstanceId() |
This method returns ID of the BPM instance or Case instance to which the Task belongs. Returns null if it is not a BPM or Case task. |
getRequestTaskMessage() |
This method returns the requested task message. |
getSubject() |
This method returns the subject. |
getTaskInstanceId() |
This method returns the Task ID of the current task. |
getTaskOutputData() |
This method returns the XML doc of the current data in the task form. |
getUserOrganization() |
This method returns the user organization. |
hideTaskToolbar() |
This method hides the Task Toolbar. |
isActionPossible(actionType) |
This method returns a Boolean value. If an action type can be performed, the value returned is 'true', else 'false'. Possible values of actionType are:
|
isCaseActivity() |
This method returns a Boolean value. If the current activity is from a case, then the value returned is 'true' else 'false'. |
isCaseInstanceView() |
This method returns true if the current window displays the Case Instance view. Returns false if it is not a Case Instance view. |
isTaskReadOnly() |
This method returns true if the task is read-only task. Returns false if it is not a read-only task. |
pauseTask() |
This method pauses the task that is being executed. |
planActivities(sPlanActivitiesXML) |
This method takes a list of case activities to be planned while completing the current task. This method can be used in conjunction with the methods <planactivities> <activity id="{2A0C054BE0FB4DB4B031601EA31853YF}" name="DiscussProblems" state=""> <activityinstanceid>PARAMETER</activityinstanceid> <activity id="" name="" type="" xmlns="http://schemas.cordys.com/casemanagement/1.0"/> </activity> </planactivities>
<planactivities xmlns="http://schemas.cordys.com/casemanagement/execution/1.0"> <activity id="" name=""> <activityinstanceid>PARAMETER</activityinstanceid> <case:activity id="" name="" type="HUMANTASK" xmlns:case=" http://schemas.cordys.com/casemanagement/1.0"> <HumanInteraction xmlns=" http://schemas.cordys.com/notification/workflow/1.0 "> <HumanTaskModelId>PARAMETER</HumanTaskModelId> <InboxModelId>PARAMETER</InboxModelId> <Subject>Chauffeur</Subject> <Priority>3</Priority> <SendTo> <ExecutionPolicy> <Entry> <Principal type="role"> cn=Mobility Case Handler, cn=Process Platform SINAS II Mobility, cn=cordys, cn=sostest, o=vanenburg.com </Principal> <Privilege>changeduedate</Privilege> <Privilege>execute</Privilege> <Privilege>view</Privilege> </Entry> <Entry> <Principal type="role"> cn=Mobility Case Reader, cn=Process Platform SINAS II Mobility, cn=cordys, cn=sostest, o=vanenburg.com </Principal> <Privilege>view</Privilege> </Entry> </ExecutionPolicy> <Target type="worklist"> <Assignee dynamic="false"> 54093d5f-5dfc-44d6-8189-32833246d5b3 </Assignee> </Target> <AssignToUser type="ASSIGN"> cn=sosadmin,cn=organizational users, o=SOS,cn=cordys,cn=sostest, o=vanenburg.com </AssignToUser> </SendTo> <DueDate dynamic="false" isDuration="true"> P0Y0M0DT2H0M0S</DueDate> </HumanInteraction> </case:activity> </activity> </planactivities> |
planIntermediateFollowups( sPlanActivitiesXML) |
This method takes a list of intermediate follow ups to be planned from the current task. This API will render the current task in Suspended mode. <planactivities xmlns="http://schemas.cordys.com/casemanagement/execution/1.0"> <activity id="00215A62-2A6E-11E1-E42B-1CDD6C323700" name="DiscussProblems"/> </planactivities>
<planactivities xmlns="http://schemas.cordys.com/casemanagement/execution/1.0"> <activity id=" 00215A62-2A6E-11E1-E42B-1CDD6C323700 " name="DiscussProblems"> <case:activity id="00215A62-2A6E-11E1-E42B-1CDD6C323700" name="DiscussProblems" type="HUMANTASK" xmlns="" xmlns:case="http://schemas.cordys.com/casemanagement/1.0" xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi" xmlns:sm="http://www.w3.org/2005/07/scxml"> <HumanInteraction xmlns="http://schemas.cordys.com/notification/workflow/1.0"> <HumanTaskModelId> 00215A62-2A6E-11E1-E42B-1CDD6C337700 </HumanTaskModelId> <Subject>DiscussProblems</Subject> <Priority>3</Priority> <SendTo> <Target type="worklist"> <Assignee dynamic="false"> 54093d5f-5dfc-44d6-8189-32833246d5b3 </Assignee> </Target> <ExecutionPolicy> <Entry> <Principal type="role">cn=Mobility Case Handler, cn=Process Platform SINAS II Mobility, cn=cordys, cn=sostest,o=vanenburg.com </Principal> <Privilege>changeduedate</Privilege> <Privilege>execute</Privilege> <Privilege>view</Privilege> </Entry> <Entry> <Principal type="role">cn=Mobility Case Reader, cn=Process Platform SINAS II Mobility, cn=cordys, cn=sostest,o=vanenburg.com </Principal> <Privilege>view</Privilege> </Entry> </ExecutionPolicy> <AssignToUser type="ASSIGN"/> </SendTo> <DueDate dynamic="false" isDuration="true">P0Y0M0DT2H0M0S</DueDate> </HumanInteraction> <case:messages> <case:input> <case:message name="DiscussProblems_DeliveryModel_IP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/> </case:input> <case:output> <case:message name="DiscussProblems_DeliveryModel_OP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/> </case:output> </case:messages> <case:associatedevents/> <case:escalation/> </case:activity> </activity> </planactivities> Note: This API triggers the identified intermediate activity and suspends the current task. However, this API will not update the current view. If you want to update the current view, then you must call the |
planFreeFollowups(planFreeFollowupsArray) |
This method will take <planactivities caseinstanceid="00215A62-2A6E-11E1-E573-4891FD9F5702" xmlns="http://schemas.cordys.com/casemanagement/execution/1.0"> <activity id="002 15A62-2A6E-11E1-E42B-1CDD6C303700" name="InformClient"/> </planactivities>
<planactivities caseinstanceid="00215A62-2A6E-11E1-E573-4891FD9F5702" xmlns="http://schemas.cordys.com/casemanagement/execution/1.0"> <activity id="002 15A62-2A6E-11E1-E42B-1CDD6C303700" name="InformClient"> <activityinstanceid> 00215A62-2A6E-11E1-E573-4591FD9F5702 </activityinstanceid> <case:activity id="00215A62-2A6E-11E1-E42B-1CDD6C303700" name="InformClient" type="HUMANTASK" xmlns="" xmlns:case="http://schemas.cordys.com/casemanagement/1.0" xmlns:ns1="http://schemas.cordys.com/1.0/xforms/processapi" xmlns:sm="http://www.w3.org/2005/07/scxml"> <HumanInteraction xmlns="http://schemas.cordys.com/notification/workflow/1.0"> <HumanTaskModelId>00215A62-2A6E-11E1-E42B-1CDD6C337700</HumanTaskModelId> <Subject>InformClient</Subject> <Priority>3</Priority> <SendTo> <ExecutionPolicy> <Entry> <Principal type="role">cn=Mobility Case Handler, cn=Process Platform SINAS II Mobility, cn=cordys, cn=sostest,o=vanenburg.com </Principal> <Privilege>changeduedate</Privilege> <Privilege>execute</Privilege> <Privilege>view</Privilege> </Entry> </ExecutionPolicy> <Target type="worklist"> <Assignee dynamic="false"> 54093d5f-5dfc-44d6-8189-32833246d5b3 </Assignee> </Target> <AssignToUser type="ASSIGN">cn=sosadmin,cn=organizational users, o=SOS, cn=cordys,cn=sostest,o=vanenburg.com </AssignToUser> </SendTo> <DueDate dynamic="false" isDuration="true">P0Y0M0DT2H0M0S</DueDate> </HumanInteraction> <case:messages> <case:input> <case:message name="InformClient_DeliveryModel_IP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/> </case:input> <case:output> <case:message name="InformClient_DeliveryModel_OP" ns="http://schemas.cordys.com/1.0/xforms/processapi"/> </case:output> </case:messages> <case:associatedevents/> <case:escalation/> </case:activity> </activity> </planactivities> |
planEvent(sEventName) |
This method accepts the event name to be planned while completing the current task. It can be used in conjunction with the |
raiseEventOnCaseActivity(sCaseInstanceId, sActivityId, sEventName) |
This method raises the event sEventName, in the context of case instance id - sCaseInstanceId and activity instance id - sActivityId. |
refresh() |
This method does a refresh of the entire task view window; it refreshes the following tabs of the task view -
|
refreshView(<tab>) |
This method refreshes the specified tabs of the current Task or current Case related activities in the Inbox and updates the data in those tabs. It accepts the following attributes as arguments:
|
resumeTask() |
This method resumes the task that is stopped. |
revokeTask() |
This method revokes the task. |
showTaskToolbar() |
This method makes the Task Toolbar visible. |
showNoFollowupsPage() |
This method will not show the Trigger Followups page while completing the Case Activity. This can be called before commiting a task, that is, onBeforeCommit action. For more information on all the available validations of task actions, refer to Validations on Task Actions |
skipTask() |
This method skips the task. |
startTask() |
This method starts executing the task. |
stopTask() |
This method stops the task completely. |
suspendTask() |
This method suspends the task. |
addButtonToTasktoolbar(title,id,functionhandler,image,accesskey) |
Adds a custom button to the task toolbar. Returns the button object reference.
|