public class ProcessInstance extends Object
Constructor and Description |
---|
ProcessInstance(BPSimulator simulation)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChildProcess(SubProcessInstance childProcess)
Defines child process
|
void |
addCost(double amount)
Adds an amount to process cost
|
int |
getActivityIndex()
Returns parent activity index.
|
List<SubProcessInstance> |
getChildProcesses()
Gets list of child processes
|
Date |
getCompletionTime()
Gets time when process instance was completed
|
int |
getEnabledActivities()
Gets number of enabled activities
|
int |
getId()
Returns an unique numeric id of instance
|
boolean |
getIsMasterProcess()
Gets whether process instance is the master process whose start events were
initiated at
|
int |
getMasterInstanceId()
Gets the master process id (overridden for Sub-Processes to return the Root
process id
|
ProcessInstance |
getPartnerProcess(String processId)
Gets partner process by id.
|
BPSimulator |
getSimulationInstance()
Instance of the simulation
|
Date |
getStartTime()
Gets time when process instance was started
|
BitSet |
getState()
Return state of the process instance
|
ProcessEventTimeline |
getTimeline()
Returns an instance of the process event timeline to set the events
|
double |
getTotalCost() |
boolean |
isCompleted()
Gets whether process instance has been completed
|
boolean |
isTerminated()
Returns if process has been terminated - either by terminate event or
interrupting throw event
|
void |
notifyCompleted(ProcessActivity activity)
Notify completion of an element.
|
void |
notifyProcessTerminated()
Marks process and its child processes terminated
|
void |
setCompletionTime(Date completionTime)
Sets the completion time for the process instance
|
void |
setMasterInstanceId(int id)
Sets the master process instance id whose stats needs to be calculated
|
void |
setPartnerProcess(String processId,
ProcessInstance process)
Defines partner processes in collaboration
|
void |
setStartTime(Date startTime)
Sets time when the process was started
|
void |
setState(BitSet state)
Sets state of the process instance
|
String |
toString() |
public ProcessInstance(BPSimulator simulation)
simulation
- Instance of the simulationpublic BitSet getState()
public void setState(BitSet state)
state
- process statepublic void addCost(double amount)
amount
- cost amount to addpublic void notifyCompleted(ProcessActivity activity) throws BPSimulatorException
a
- instance representing element which was completedBPSimulatorException
public int getId()
public boolean isTerminated()
public void notifyProcessTerminated()
public int getActivityIndex()
public int getEnabledActivities()
public void setPartnerProcess(String processId, ProcessInstance process)
processId
- id of another processprocess
- process instance in collaborationpublic ProcessInstance getPartnerProcess(String processId)
processId
- id of a partner process.public void addChildProcess(SubProcessInstance childProcess)
childProcess
- instance of a child processpublic List<SubProcessInstance> getChildProcesses()
public Date getStartTime()
public void setStartTime(Date startTime)
startTime
- time stamppublic Date getCompletionTime()
public void setCompletionTime(Date completionTime)
completionTime
- time stamppublic double getTotalCost()
public BPSimulator getSimulationInstance()
public int getMasterInstanceId()
public ProcessEventTimeline getTimeline()
public void setMasterInstanceId(int id)
value
- public boolean getIsMasterProcess()
public boolean isCompleted()
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.