public void addWorkflowProperties(Workflow workflow, Vertex processVertex, String processName) { processVertex.setProperty( WorkflowExecutionArgs.USER_WORKFLOW_NAME.getName(), ProcessHelper.getProcessWorkflowName(workflow.getName(), processName)); processVertex.setProperty(RelationshipProperty.VERSION.getName(), workflow.getVersion()); processVertex.setProperty( WorkflowExecutionArgs.USER_WORKFLOW_ENGINE.getName(), workflow.getEngine().value()); }
public void addWorkflowInstanceProperties( Vertex processInstance, WorkflowExecutionContext context) { for (WorkflowExecutionArgs instanceWorkflowProperty : INSTANCE_WORKFLOW_PROPERTIES) { addProperty(processInstance, context, instanceWorkflowProperty); } processInstance.setProperty( RelationshipProperty.VERSION.getName(), context.getUserWorkflowVersion()); }
/** * This unfortunately requires a handle to Titan implementation since * com.tinkerpop.blueprints.KeyIndexableGraph#createKeyIndex does not create an index. */ protected void createIndicesForVertexKeys() { if (!((KeyIndexableGraph) graph).getIndexedKeys(Vertex.class).isEmpty()) { LOG.info("Indexes already exist for graph"); return; } LOG.info("Indexes does not exist, Creating indexes for graph"); // todo - externalize this makeNameKeyIndex(); makeKeyIndex(RelationshipProperty.TYPE.getName()); makeKeyIndex(RelationshipProperty.TIMESTAMP.getName()); makeKeyIndex(RelationshipProperty.VERSION.getName()); makeInstanceIndex(); }