mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Part of ACTVT 93: The Share client exposes the diagram associated with a workflow
Added a getWorkflowImage(String workflowInstanceId) method to WorkflowService and WorkflowComponent interfaces. JBPM implementation will always return null, Activiti implementation will return an InputStream when diagramming information is available. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28264 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -247,6 +247,15 @@ public interface WorkflowComponent
|
|||||||
* @return the list of active timers
|
* @return the list of active timers
|
||||||
*/
|
*/
|
||||||
public List<WorkflowTimer> getTimers(String workflowId);
|
public List<WorkflowTimer> getTimers(String workflowId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a graphical view of the workflow instance
|
||||||
|
*
|
||||||
|
* @param workflowInstanceId the workflow instance id
|
||||||
|
* @return image view of the workflow instance as an InputStream or null if a diagram is not available
|
||||||
|
* @since 4.0
|
||||||
|
*/
|
||||||
|
public InputStream getWorkflowImage(String workflowInstanceId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -553,6 +553,19 @@ public class WorkflowServiceImpl implements WorkflowService
|
|||||||
return component.getStartTask(workflowInstanceId);
|
return component.getStartTask(workflowInstanceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see
|
||||||
|
* org.alfresco.service.cmr.workflow.WorkflowService#getWorkflowImage(
|
||||||
|
* java.lang.String)
|
||||||
|
*/
|
||||||
|
public InputStream getWorkflowImage(String workflowInstanceId)
|
||||||
|
{
|
||||||
|
String engineId = BPMEngineRegistry.getEngineId(workflowInstanceId);
|
||||||
|
WorkflowComponent component = getWorkflowComponent(engineId);
|
||||||
|
return component.getWorkflowImage(workflowInstanceId);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see
|
* @see
|
||||||
|
@@ -1000,6 +1000,16 @@ public class ActivitiWorkflowEngine extends BPMEngine implements WorkflowEngine
|
|||||||
throw new WorkflowException(msg, ae);
|
throw new WorkflowException(msg, ae);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InputStream getWorkflowImage(String workflowInstanceId)
|
||||||
|
{
|
||||||
|
// TODO: Link this up with the underlying Activiti instance diagram API
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts the given list of {@link ProcessDefinition}s to a list of {@link WorkflowDefinition}s
|
* Converts the given list of {@link ProcessDefinition}s to a list of {@link WorkflowDefinition}s
|
||||||
|
@@ -1288,6 +1288,17 @@ public class JBPMEngine extends AlfrescoBpmEngine implements WorkflowEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.alfresco.repo.workflow.WorkflowComponent#getWorkflowImage(java.lang.String)
|
||||||
|
*/
|
||||||
|
public InputStream getWorkflowImage(final String workflowInstanceId)
|
||||||
|
{
|
||||||
|
// we don't support workflow instance diagrams in JBPM so return null
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Task Management ...
|
// Task Management ...
|
||||||
//
|
//
|
||||||
|
@@ -308,6 +308,15 @@ public interface WorkflowService
|
|||||||
@Auditable(parameters = {"pathId"})
|
@Auditable(parameters = {"pathId"})
|
||||||
public WorkflowTask getStartTask(String workflowInstanceId);
|
public WorkflowTask getStartTask(String workflowInstanceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a graphical view of the workflow instance
|
||||||
|
*
|
||||||
|
* @param workflowInstanceId the workflow instance id
|
||||||
|
* @return image view of the workflow instance as an InputStream or null if a diagram is not available
|
||||||
|
* @since 4.0
|
||||||
|
*/
|
||||||
|
@Auditable(parameters = {"workflowInstanceId"})
|
||||||
|
public InputStream getWorkflowImage(String workflowInstanceId);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Workflow Timer Management
|
// Workflow Timer Management
|
||||||
|
Reference in New Issue
Block a user