nl.innovationinvestments.cheyenne.engine.components
Class WFStart

java.lang.Object
  extended by nl.innovationinvestments.cheyenne.engine.components.Component
      extended by nl.innovationinvestments.cheyenne.engine.components.WFStart

public class WFStart
extends Component

There are two ways of using the workflows: in memory or persisted (long running). Long running workflows are stored in a database; the process definition of which it is an instance, must also be stored in the database. So when a long running workflow is created, the name and optional version specifiy with definition to use. The resulting workflow is persisted in the database, so it can be identified through an "id". The id is what is managed by the Cheyenne application (by storing it in a variable and optionally in some database). In-memory workflows are never stored in any kind of database, therefore there also is no list of existing process definitions to create a workflow from; there simply is no database. So in-memory workflows have to be created from the XML each and every time. The XML can me written in-line or in a separate file (for re-use), referenced through a url. When a workflow is created, the actual object must be stored, in this case in the same context as the variable. In order to be compatible with long running workflows, an ID is returned, which denotes the workflow. The id is what is managed by the Cheyenne application (by storing it in a variable), but it is quite useless to store this id in a database.

Author:
User

Nested Class Summary
static interface WFStart.RunnableWithCorrectProcessInstance
           
 
Field Summary
static java.lang.String CONTEXT_VARIABLE_PERSIST
           
static java.lang.String PROCESSID_PREFIX
           
static java.lang.String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Constructor Summary
WFStart()
           
WFStart(Dialog dialog)
           
 
Method Summary
 void append(java.lang.String s)
           
static boolean determineIfLongRunning(java.lang.String id)
           
static long determineProcessId(java.lang.String id)
           
static java.lang.String determineScopeId(java.lang.String id)
           
static long determineTokenId(java.lang.String id)
           
 void finish()
           
 java.lang.String getAs()
          As
 java.lang.String getName()
          Name
 java.lang.String getScope()
          Scope
 java.lang.String getUrl()
          Url: may either be a getResource on the dialog class or a real URL with protocol
 java.lang.String getVersion()
          Version
static java.lang.String makeSureTokenHasPrefix(java.lang.String wfid, long tokenId)
          When you have a token from the wf, you need to prefix it.
static void runWithCorrectProcessInstance(Dialog dialog, java.lang.String id, WFStart.RunnableWithCorrectProcessInstance runnable)
           
 void setAs(java.lang.String value)
           
 void setName(java.lang.String value)
           
 void setScope(java.lang.String value)
           
 void setUrl(java.lang.String value)
           
 void setVersion(java.lang.String value)
           
 
Methods inherited from class nl.innovationinvestments.cheyenne.engine.components.Component
getDialog, getId, getLog4j, iterate, setDialog, setId, setLog4j, start, startAndfinish
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final java.lang.String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values

CONTEXT_VARIABLE_PERSIST

public static final java.lang.String CONTEXT_VARIABLE_PERSIST
See Also:
Constant Field Values

PROCESSID_PREFIX

public static final java.lang.String PROCESSID_PREFIX
See Also:
Constant Field Values
Constructor Detail

WFStart

public WFStart()

WFStart

public WFStart(Dialog dialog)
Parameters:
dialog -
Method Detail

getName

public java.lang.String getName()
Name


setName

public void setName(java.lang.String value)

getVersion

public java.lang.String getVersion()
Version


setVersion

public void setVersion(java.lang.String value)

getAs

public java.lang.String getAs()
As


setAs

public void setAs(java.lang.String value)

getScope

public java.lang.String getScope()
Scope


setScope

public void setScope(java.lang.String value)

getUrl

public java.lang.String getUrl()
Url: may either be a getResource on the dialog class or a real URL with protocol


setUrl

public void setUrl(java.lang.String value)

append

public void append(java.lang.String s)

finish

public void finish()
Overrides:
finish in class Component

determineIfLongRunning

public static boolean determineIfLongRunning(java.lang.String id)
Parameters:
id -
Returns:

determineScopeId

public static java.lang.String determineScopeId(java.lang.String id)
Parameters:
id -
Returns:

determineProcessId

public static long determineProcessId(java.lang.String id)
Parameters:
id -
Returns:

determineTokenId

public static long determineTokenId(java.lang.String id)
Parameters:
id -
Returns:

runWithCorrectProcessInstance

public static void runWithCorrectProcessInstance(Dialog dialog,
                                                 java.lang.String id,
                                                 WFStart.RunnableWithCorrectProcessInstance runnable)
Parameters:
id -
runnable -

makeSureTokenHasPrefix

public static java.lang.String makeSureTokenHasPrefix(java.lang.String wfid,
                                                      long tokenId)
When you have a token from the wf, you need to prefix it. Suppose you have a workflow "LR:3" and you split child tokens 4 and 5, then using "LR:3" you need to return "LR:4" and "LR:5"

Parameters:
wfid -
tokenId -
Returns:


Copyright © 2010 InnovationInvestments. All Rights Reserved.