Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Stardust/Knowledge Base/API/ExamplesofAPIUsage/CompleteAnActivity"
< Stardust | Knowledge Base
Line 20: | Line 20: | ||
And out data mappings of the activity you want to complete: | And out data mappings of the activity you want to complete: | ||
− | [[Image:Stardust CompleteAc OutDataID.png|360x225px|Stardust Complete Activity Out Data Mapping]]<br> | + | [[Image:Stardust CompleteAc OutDataID.png|360x225px|Stardust Complete Activity Out Data Mapping]]<br> |
+ | |||
+ | ==== Implementation<br> ==== | ||
+ | |||
+ | '''Exception handling'''<br>To keep the example code clear the exception handling is very simple. If you use this code productive, please add appropriate exception handling | ||
+ | |||
+ | '''Missing parts'''<br> | ||
+ | |||
+ | The missing code fragments ([...]) can be found [[STP/Stardust/KnowledgeBase/API/ExamplesofAPIUsage/CompleteAPIExample|here]]. | ||
+ | |||
+ | <br><br> | ||
+ | |||
+ | <br><br> |
Revision as of 15:12, 17 November 2011
Complete an Activity
Purpose
Completing an activity consists of four steps:
- Get the activity from the process instance
- Get the in data from the activity instance
- Calculate the out data for the activity instance
- Call the API with the out data to complete the activity instance.
Requirements
You need a Process Instance, Initialized services and the id of the in data mappings:
And out data mappings of the activity you want to complete:
Implementation
Exception handling
To keep the example code clear the exception handling is very simple. If you use this code productive, please add appropriate exception handling
Missing parts
The missing code fragments ([...]) can be found here.