Trace:
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
workflow:server:start_workflow [2020/02/21 11:52] admin |
workflow:server:start_workflow [2020/06/15 10:25] (current) cduncan |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ~~NOTRANS~~ | ~~NOTRANS~~ | ||
| - | ~~Title: Start Workflow on server-side~~ | + | ~~Title: Start Workflow on Server Side~~ |
| - | If you want to start a specific Workflow on server-side in an [[jvx:server:lco:actions_in_objects|action]] of your [[jvx:server:lco:lifecycle|life-cycle object]], it's straight forward. Simply use the workflow access object and call one method: | + | If you want to start a specific workflow on server side in an [[jvx:server:lco:actions_in_objects|action]] of your [[jvx:server:lco:lifecycle|life-cycle object]], it's straight forward. Simply use the workflow access object and call one method: |
| <code java> | <code java> | ||
| Line 8: | Line 8: | ||
| </code> | </code> | ||
| - | But be careful, if you run above code outside the life-cycle scope, because | + | Be careful if you run above code outside the life cycle scope because |
| <code java> | <code java> | ||
| WorkflowAccess.getCurrentInstance(); | WorkflowAccess.getCurrentInstance(); | ||
| </code> | </code> | ||
| - | tries to access the workflow access object from the current [[jvx:server:lco:sessioncontext|SessionContext]]. | + | tries to get the workflow access object via [[jvx:server:lco:sessioncontext|SessionContext]]. |
| - | If you don't run inside the life-cycle scope, use | + | If you don't run inside the life cycle scope, use |
| <code java> | <code java> | ||
| WorkflowAccess wfa = new WorkflowAccess(); | WorkflowAccess wfa = new WorkflowAccess(); | ||
