org.javasteps
Interface ProcessContext

All Known Subinterfaces:
Process
All Known Implementing Classes:
ProcessImpl

public interface ProcessContext

The ProcessContext interface represents the state of the process

Version:
1.1
Author:
Ran Kornfeld

Nested Class Summary
static class ProcessContext.ProcessStatus
          The Status enum marks the status of the process
 
Method Summary
 int getActionStepsCount()
          Gets the total number of ActionSteps in this process
 Object getParameter(String key)
          Gets a process wide parameter
 Map<String,Object> getParameters()
          Gets the process wide parameters' map
 ProcessContext.ProcessStatus getStatus()
          Gets the current process status
 boolean isStopped()
          Check if the process was stoped before it was finished
 void setParameter(String key, Object value)
          Sets a process wide parameter
 void stop(boolean fail)
          Stop the running process, will not continue to the next step.
 

Method Detail

stop

void stop(boolean fail)
Stop the running process, will not continue to the next step.

Parameters:
fail - true if the process was stopped because of a failure. Will set the Status to FAILED.

isStopped

boolean isStopped()
Check if the process was stoped before it was finished


getStatus

ProcessContext.ProcessStatus getStatus()
Gets the current process status

Returns:
The process status

getParameter

Object getParameter(String key)
Gets a process wide parameter

Parameters:
key - The parameter's key
Returns:
The parameter's value

setParameter

void setParameter(String key,
                  Object value)
Sets a process wide parameter

Parameters:
key - The parameter's key
value - The parameter's value

getParameters

Map<String,Object> getParameters()
Gets the process wide parameters' map


getActionStepsCount

int getActionStepsCount()
Gets the total number of ActionSteps in this process