Package com.simplicite.bpm
Class Transition
- java.lang.Object
-
- com.simplicite.bpm.Transition
-
- All Implemented Interfaces:
java.io.Serializable
public class Transition extends java.lang.Object implements java.io.Serializable
Workflow transition- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Transition(java.lang.String id, java.lang.String name, Activity from, Activity to, java.lang.String condition, java.lang.String callback)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
callback(ActivityFile context, Grant g)
Invoke the callback and send the notification when specifiedboolean
condition(java.lang.String code)
Transition conditionActivity
fromActivity()
Get originAction
getAction()
Get actionAlert
getAlert()
Get the transition notificationjava.lang.String
getCallback()
Get callback namejava.lang.String
getCondition()
Get condition value of transitionjava.lang.String
getId()
Get transition IDjava.lang.String
getName()
Get optional namevoid
setAction(Action a)
Set actionvoid
setAlert(Alert a)
Assign a transition notificationActivity
toActivity()
Get destinationorg.json.JSONObject
toJSONObject()
Generates a JSON object representation of the transitionjava.lang.String
toString()
Generates a JSON string representation of the transition
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Get transition ID- Returns:
- Transition ID
-
getName
public java.lang.String getName()
Get optional name- Returns:
- Optional name
-
fromActivity
public Activity fromActivity()
Get origin- Returns:
- Origin
-
toActivity
public Activity toActivity()
Get destination- Returns:
- Destination
-
getAction
public Action getAction()
Get action- Returns:
- Action
-
setAction
public void setAction(Action a)
Set action- Parameters:
a
- Action
-
condition
public boolean condition(java.lang.String code)
Transition condition- Parameters:
code
- Returned code from activity- Returns:
- True if code is null or matches with one conditional value (separator ;)
-
getCondition
public java.lang.String getCondition()
Get condition value of transition- Returns:
- Condition value of transition
-
getCallback
public java.lang.String getCallback()
Get callback name- Returns:
- callback
-
callback
public void callback(ActivityFile context, Grant g)
Invoke the callback and send the notification when specified- Parameters:
context
- Contextual activityg
- Grant
-
getAlert
public Alert getAlert()
Get the transition notification- Returns:
- Alert
-
setAlert
public void setAlert(Alert a)
Assign a transition notification- Parameters:
a
- Alert
-
toJSONObject
public org.json.JSONObject toJSONObject()
Generates a JSON object representation of the transition- Returns:
- transition as a JSON object
-
toString
public java.lang.String toString()
Generates a JSON string representation of the transition- Overrides:
toString
in classjava.lang.Object
- Returns:
- transition as a JSON string
-
-