Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

cancel(current)

This method allows cancelling all active contexts of the current record.


Parameter(s):

NameTypeMandatoryDefault Value
currentSimpleRecord objectYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titlecancel
linenumberstrue
    if (simpleWorkflow.hasActiveContexts(current)) {
    	simpleWorkflow.cancel(current);
    }

copy()

This method copies the workflow with creating a version in the Checked Out state and after that returns a copied workflow.


Return:

TypeDescription
SimpleRecord object or NULL


Example:

Code Block
languagejs
themeEclipse
titlecopy
linenumberstrue
   	let copiedWorkflow = simpleWorkflow.copy();
   	let simpleWorkflow = new SimpleWorkflow(copiedWorkflow.sys_id);

delete()

This method deletes the workflow and all its elements.


Return:

TypeDescription
BooleanThis method returns the boolean result (TRUE if the workflow was successful deleted; otherwise, returns FALSE).


Example:

Code Block
languagejs
themeEclipse
titledelete
linenumberstrue
   	let copiedWorkflow = simpleWorkflow.copy();
   	let simpleWorkflow = new SimpleWorkflow(copiedWorkflow.sys_id);
   	if (simpleWorkflow.delete()) {
   		ss.info('Workflow deleted!');
   	}


hasActiveContexts(current)

This method checks the current record if there are any active workflow contexts present or not.


Parameter(s):

NameTypeMandatoryDefault Value
currentSimplerecord objectYN


Return:

TypeDescription
BooleanThis method returns the boolean result (TRUE if the active workflow context presents; otherwise, returns FALSE).


Example:

Code Block
languagejs
themeEclipse
titlehasActiveContext
linenumberstrue
    if (simpleWorkflow.hasActiveContexts(current)) {
    	simpleWorkflow.cancel(current);
    }

revival(executingActivity, current)

This public function restarts the workflow starting with the activity specified.


Parameter(s):

NameTypeMandatoryDefault Value
executingActivitySimplerecord objectYN
currentSimplerecord objectYN


Return:

TypeDescription
SimpleRecord object


Example:

Code Block
languagejs
themeEclipse
titlerevival
linenumberstrue


start(current)

This method is intended to start the workflow.


Parameter(s):

NameTypeMandatoryDefault Value
currentSimpleRecord objectYN


Return:

TypeDescription
SimpleRecord object or NULL


Example:

Code Block
languagejs
themeEclipse
titlestart
linenumberstrue
    let context = simpleWorkflow.start(current);
    if (context.state === 'finished') {
    	ss.info('Workflow finished!');
    }

...


startSubflow(executingActivity, current, workflowId)

Method description


Parameter(s):

NameTypeMandatoryDefault Value

...

executingActivity

...

SimpleRecord object

...

Y

...

N

...

current

...

SimpleRecord object

...

Y

...

N

...

workflowId

...

Integer

...

Y

method()

Method description

Parameter(s):

...

N


Return:

TypeDescription
SimpleRecord object or NULL


Example:

Code Block
languagejs
themeEclipse
titlestartSubflow
linenumberstrue

method()

Method description

Parameter(s):

...

Return:

...

Example:

...



Table of Contents
absoluteUrltrue
classfixedPosition