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
‘Conditions’ tab in ‘Activity’ step type will perform the different types of conditions on workitems, like before starting of a workitem.
We have 3 types of conditions.
- 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.
- 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.
- 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.
Step 2:
I have created a Task with the following details.
Save the task.
- 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’.
Come back from the screen. Enter some text in the Task Description
- 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.
Go to ‘condition’ tab in the activity step. We can observe three types of conditions in the screen.
- Create workitem
- Complete workitem
- Complete execution
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
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.
Save, activate and execute the workflow. Provide element WI_Elem value as ‘5’ and execute.
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.
In the technical details of log, we can observe a different symbol at the step and in ‘Message’ tab message text as ‘Execution Interrupted’.
Go and check in the agent inbox. There is no workitem from our workflow.
In the execution time of our workflow, if I provide the element WI_Elem value as 10, it will works fine.
After workitem execution the workflow log appears as usual.
ENJOY WORKFLOWS…..
Regards,
Murali Krishna.
Dear Murali
Execellent Document
Hey Murali
Good one!
I have book marked it to provide this as an answer to various dicussions where people want specific checks before or after step executions and not allow to proceed further.
Be prepared for a lot of likes 😉
regards,
Modak
Thank you Modak Gupta
With your motivation I will try to post some more documents ...
Regards,
Murali Krishna.
Nice doumentation Maurali
Thanks Dear Anjan Paul ,
Regards,
Murali Krishna.
Informative........
Nice one Murali.
Regards,
Raju K. Rao
Great Job Murali, i'm expecting More Documents... 🙂
Its very useful 🙂 🙂 🙂
Excelent Mr murali & its very usefull .
Regards,
Mahesh 🙂
usefull info Murali.
Regards,
Rajakala.
Nice doc. and worth reading....
Can you explain the real time difference between Complete Workitem and Complete Execution options? also with some realtime exampls of thier usage.
Regards,
Ibrahim
Hi ibrahim,
I am just digging the workflow (every step types & etc ) and came to know that conditions tab. I haven't worked on that particular requirement. I will update you surely if I got any inputs for the same,
Thanks.
Regards,
Murali Krishna.
Nice document murali
Excellent Document Murali......will be waiting for more doc's like this. Keep BLOGGING!!!
Regards,
Mohsin.
Hi Murali,
Thanks a lot for the wonderful Blog and sharing your Knowledge.
It would be great if you can add the real workflow scenario's where conditions can be used.
Regards,
Gaurang
Hi Murali,
Thanks a lot for the wonderful Blog and sharing your Knowledge.
Thanks for innovative document Murali.
Regards,
Pavan A
Knowledge Sharing Document ....
Best Regards,
Haritha....
Hi Murali
Nice document...Thanks for sharing
Nice document Murali !!!
Good document with clear step by step procedures..... Good Work Murali 🙂 🙂