Skip to Content

Condition to start a workitem

Friends….

  We can put conditions to create the workitem, after creation of the workitem and after execution of the workitem.

(We can use Condition step type to validate the technical functions). (If you are not familiar with Standard task creation, check the below link

  http://scn.sap.com/blogs/anomitroguha/2012/04/11/part-3-creation-of-a-workflow-standard-task-and-binding-of-rule ).

‘Conditions’ tab in ‘Activity’ step type will perform the different types of conditions on workitems, like before starting of a workitem.

img 1.png

We have 3 types of conditions.

  1. Create workitem: When a workitem was generated, it will check the respective condition was satisfied or not? At that time the workitem status is “IN PREPARATION”, the workitem is not accessible anywhere.
  2. Complete Workitem: In this case, workitem will be generated, but it will not complete until the condition is true. The workitem will not complete until the condition evaluates to true.
  3. Complete Execution: After execution of the workitem, the condition will be evaluated and if it is true then only the workitem will complete.

Step 1:

Create a workflow container element and make it as import as mentioned below.

img 2.png

Step 2:

I have created a Task with the following details.

img 3.png

Save the task.

  1. Maintain the task as ‘General Task’ as mentioned below. Menu options –> Additional data–> Agent assignment–> Maintain.

Select the task and click on ‘Attributes’ button. Select ‘General Task’ radio button and click on ‘Transfer’.

img 4.png

Come back from the screen. Enter some text in the Task Description

img 5.png

  1. Save task & come back. Maintain possible Binding from Workflow to Task and vice versa.

In the ‘Agents’ tab of activity step, select ‘User’ and any user name as mentioned below.

img 6.png

Go to ‘condition’ tab in the activity step. We can observe three types of conditions in the screen.

  1. Create workitem
  2. Complete workitem
  3. Complete execution

img 7.png

Open ‘create work item’ tab to create a condition, if this condition is true then only workitem will create.

Click on ‘click here to create a new condition’ sentence to create the condition.

Enter the following condition

img 8.png

Note: We know the condition is false, for this step workitem will not create until the condition is true.

We can find a symbol in the ‘conditions’ tab as mentioned below.

img 9.png

Save, activate and execute the workflow. Provide element WI_Elem value as ‘5’ and execute.

img 10.png

It will show the agent name in the ActiveX version log but unfortunately the workitem will not be available in agent inbox. Scroll down to check user inbox.

img 11.png

In the technical details of log, we can observe a different symbol at the step and in ‘Message’ tab message text as ‘Execution Interrupted’.

img 12.png

Go and check in the agent inbox. There is no workitem from our workflow.

img 13.png

In the execution time of our workflow, if I provide the element WI_Elem value as 10, it will works fine.

img 14.png

img 15.png

After workitem execution the workflow log appears as usual.

ENJOY WORKFLOWS…..

Regards,

Murali Krishna.

22 Comments
You must be Logged on to comment or reply to a post.