|
This page lists step-precondition scripts that are taken straight from the [https://bugs.urbancode.com/secure/IssueNavigator.jspa?reset=true&&pid=10110&sorter/field=issuekey&sorter/order=ASC public JIRA site]. Please note that some scripts may be ''snippets'' and '''probably WILL need''' modification to work properly for your situation. Treat these as templates that you can modify from. |
|
This page lists step-precondition scripts that are taken straight from the [https://bugs.urbancode.com/secure/IssueNavigator.jspa?reset=true&&pid=10110&sorter/field=issuekey&sorter/order=ASC public JIRA site]. Please note that some scripts may be ''snippets'' and '''probably WILL need''' modification to work properly for your situation. Treat these as templates that you can modify from. |
|
|
+ |
= Step Pre-Condition That Works Based on a Workflow Name =
|
|
|
+ |
<pre>// This script will run a step if the name of the workflow is "Workflow Name"
|
|
|
+ |
import com.urbancode.anthill3.domain.workflow.*;
|
|
|
+ |
import com.urbancode.anthill3.runtime.scripting.helpers.*;
|
|
|
+ |
Workflow workflow = WorkflowLookup.getCurrent();
|
|
|
+ |
public boolean matches(Object obj) {
|
|
|
+ |
name = workflow.getName();
|
|
|
+ |
if("Workflow Name".equals(name)){
|