workflowPackageComponent.deletePackage(instance.getWorkflowPackage()); result.add(instance);
workflowPackageComponent.deletePackage(instance.getWorkflowPackage()); result.add(instance);
public WorkflowTask update() { WorkflowTask task = workflowService.getTaskById(taskId); NodeRef packageNode = task.getPath().getInstance().getWorkflowPackage(); packageMgr.update(packageNode); WorkflowTask result = workflowService.updateTask(taskId, properties, add, remove); properties.clear(); add.clear(); remove.clear(); return result; }
public WorkflowTask update() { WorkflowTask task = workflowService.getTaskById(taskId); NodeRef packageNode = task.getPath().getInstance().getWorkflowPackage(); packageMgr.update(packageNode); WorkflowTask result = workflowService.updateTask(taskId, properties, add, remove); properties.clear(); add.clear(); remove.clear(); return result; }
public WorkflowInstance deleteWorkflow(String workflowId) { String engineId = BPMEngineRegistry.getEngineId(workflowId); WorkflowComponent component = getWorkflowComponent(engineId); WorkflowInstance instance = component.deleteWorkflow(workflowId); // NOTE: Delete workflow package after deleting workflow, so it's still // available // in process-end events of workflow definition workflowPackageComponent.deletePackage(instance.getWorkflowPackage()); return instance; }
public WorkflowInstance deleteWorkflow(String workflowId) { String engineId = BPMEngineRegistry.getEngineId(workflowId); WorkflowComponent component = getWorkflowComponent(engineId); WorkflowInstance instance = component.deleteWorkflow(workflowId); // NOTE: Delete workflow package after deleting workflow, so it's still // available // in process-end events of workflow definition workflowPackageComponent.deletePackage(instance.getWorkflowPackage()); return instance; }
/** * Send workflow assigned email notification. * * @param taskId workflow global task id * @param taskType task type * @param assignedAuthorites assigned authorities * @param pooled true if pooled task, false otherwise */ public void sendWorkflowAssignedNotificationEMail(String taskId, String taskType, String[] assignedAuthorites, boolean pooled) { // Get the workflow task WorkflowTask workflowTask = workflowService.getTaskById(taskId); // Get the workflow properties Map<QName, Serializable> props = workflowTask.getProperties(); // Get the title and description String title = taskType == null ? workflowTask.getTitle() : taskType + ".title"; String description = (String)props.get(WorkflowModel.PROP_DESCRIPTION); // Get the duedate, priority and workflow package Date dueDate = (Date)props.get(WorkflowModel.PROP_DUE_DATE); Integer priority = (Integer)props.get(WorkflowModel.PROP_PRIORITY); NodeRef workflowPackage = workflowTask.getPath().getInstance().getWorkflowPackage(); // Send notification sendWorkflowAssignedNotificationEMail(taskId, title, description, dueDate, priority, workflowPackage, assignedAuthorites, pooled); }
/** * Send workflow assigned email notification. * * @param taskId workflow global task id * @param taskType task type * @param assignedAuthorites assigned authorities * @param pooled true if pooled task, false otherwise */ public void sendWorkflowAssignedNotificationEMail(String taskId, String taskType, String[] assignedAuthorites, boolean pooled) { // Get the workflow task WorkflowTask workflowTask = workflowService.getTaskById(taskId); // Get the workflow properties Map<QName, Serializable> props = workflowTask.getProperties(); // Get the title and description String title = taskType == null ? workflowTask.getTitle() : taskType + ".title"; String description = (String)props.get(WorkflowModel.PROP_DESCRIPTION); // Get the duedate, priority and workflow package Date dueDate = (Date)props.get(WorkflowModel.PROP_DUE_DATE); Integer priority = (Integer)props.get(WorkflowModel.PROP_PRIORITY); NodeRef workflowPackage = workflowTask.getPath().getInstance().getWorkflowPackage(); // Send notification sendWorkflowAssignedNotificationEMail(taskId, title, description, dueDate, priority, workflowPackage, assignedAuthorites, pooled); }
out.println("initiator: " + workflow.getInitiator()); out.println("context: " + workflow.getContext()); out.println("package: " + workflow.getWorkflowPackage());
out.println("initiator: " + workflow.getInitiator()); out.println("context: " + workflow.getContext()); out.println("package: " + workflow.getWorkflowPackage());
assertEquals(testWorkflowPackage, workflowInstance.getWorkflowPackage());
assertEquals(testWorkflowPackage, workflowInstance.getWorkflowPackage());
public boolean setWorkflowForPackage(WorkflowInstance instance) NodeRef packageNode = instance.getWorkflowPackage(); if(packageNode==null) return false;
public boolean setWorkflowForPackage(WorkflowInstance instance) NodeRef packageNode = instance.getWorkflowPackage(); if(packageNode==null) return false;