public interface WorkflowLib
The implementation is responsible for doing the store operations in a transactional way, either in autocommit or within the scope of a transaction.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close store.
|
void |
commit()
Commit changes to store.
|
WorkflowInstance |
createInstance(WorkflowApp app,
org.apache.hadoop.conf.Configuration conf)
Create a workflow instance.
|
WorkflowInstance |
createInstance(WorkflowApp app,
org.apache.hadoop.conf.Configuration conf,
String wfId)
Create a workflow instance with the given wfId and actions endtime map.
|
void |
delete(String id)
Delete a workflow instance from storage.
|
WorkflowInstance |
get(String id)
Load a workflow instance from storage.
|
void |
insert(WorkflowInstance instance)
Insert a workflow instance in storage.
|
WorkflowApp |
parseDef(String wfXml,
org.apache.hadoop.conf.Configuration jobConf,
org.apache.hadoop.conf.Configuration configDefault)
Parse a workflow application definition.
|
void |
update(WorkflowInstance instance)
Update a workflow instance in storage.
|
WorkflowApp parseDef(String wfXml, org.apache.hadoop.conf.Configuration jobConf, org.apache.hadoop.conf.Configuration configDefault) throws WorkflowException
wfXml
- string containing the workflow definition.jobConf
- job configurationconfigDefault
- configuration from config-default.xmlWorkflowException
- thrown if the definition could not be parsed.WorkflowInstance createInstance(WorkflowApp app, org.apache.hadoop.conf.Configuration conf) throws WorkflowException
app
- application to create a workflow instance of.conf
- job configuration.WorkflowException
- thrown if the instance could not be created.WorkflowInstance createInstance(WorkflowApp app, org.apache.hadoop.conf.Configuration conf, String wfId) throws WorkflowException
app
- application to create a workflow instance of.conf
- job configuration.wfId
- Workflow ID.WorkflowException
- thrown if the instance could not be created.void insert(WorkflowInstance instance) throws WorkflowException
instance
- of the workflow instance to insert.WorkflowException
- thrown if the instance could not be inserted.WorkflowInstance get(String id) throws WorkflowException
id
- ID of the workflow instance to load.WorkflowException
- thrown if the instance could not be loaded.void update(WorkflowInstance instance) throws WorkflowException
instance
- workflow instance to update.WorkflowException
- thrown if the instance could not be loaded.void delete(String id) throws WorkflowException
id
- ID of the workflow instance to delete.WorkflowException
- thrown if the instance could not be deleted.void commit() throws WorkflowException
WorkflowException
- thrown if the commit could not be done.void close() throws WorkflowException
WorkflowException
- thrown if the close could not be done.Copyright © 2018 Apache Software Foundation. All rights reserved.