mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- first pass at summary screen for create form.
- making workflowdefinition immutable and adding getters so i can access bean properties from jsps. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4391 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1785,18 +1785,18 @@ public class JBPMEngine extends BPMEngine
|
||||
*/
|
||||
protected WorkflowDefinition createWorkflowDefinition(ProcessDefinition definition)
|
||||
{
|
||||
WorkflowDefinition workflowDef = new WorkflowDefinition();
|
||||
workflowDef.id = createGlobalId(new Long(definition.getId()).toString());
|
||||
workflowDef.name = definition.getName();
|
||||
workflowDef.title = getLabel(workflowDef.name + ".workflow", TITLE_LABEL, workflowDef.name);
|
||||
workflowDef.description = getLabel(workflowDef.name + ".workflow", DESC_LABEL, workflowDef.title);
|
||||
workflowDef.version = new Integer(definition.getVersion()).toString();
|
||||
Task startTask = definition.getTaskMgmtDefinition().getStartTask();
|
||||
if (startTask != null)
|
||||
{
|
||||
workflowDef.startTaskDefinition = createWorkflowTaskDefinition(startTask);
|
||||
}
|
||||
return workflowDef;
|
||||
final Task startTask = definition.getTaskMgmtDefinition().getStartTask();
|
||||
final String name = definition.getName();
|
||||
final String title = getLabel(name + ".workflow", TITLE_LABEL, name);
|
||||
final String description = getLabel(name + ".workflow", DESC_LABEL, title);
|
||||
return new WorkflowDefinition(createGlobalId(new Long(definition.getId()).toString()),
|
||||
name,
|
||||
new Integer(definition.getVersion()).toString(),
|
||||
title,
|
||||
description,
|
||||
(startTask != null
|
||||
? createWorkflowTaskDefinition(startTask)
|
||||
: null));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -24,24 +24,65 @@ package org.alfresco.service.cmr.workflow;
|
||||
*/
|
||||
public class WorkflowDefinition
|
||||
{
|
||||
//XXarielb these should most likely all be private
|
||||
public final String id;
|
||||
public final String name;
|
||||
public final String version;
|
||||
public final String title;
|
||||
public final String description;
|
||||
public final WorkflowTaskDefinition startTaskDefinition;
|
||||
|
||||
public WorkflowDefinition(final String id,
|
||||
final String name,
|
||||
final String version,
|
||||
final String title,
|
||||
final String description,
|
||||
final WorkflowTaskDefinition startTaskDefinition)
|
||||
{
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.startTaskDefinition = startTaskDefinition;
|
||||
}
|
||||
|
||||
/** Workflow Definition unique id */
|
||||
public String id;
|
||||
public String getId()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
|
||||
|
||||
/** Workflow Definition name */
|
||||
public String name;
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/** Workflow Definition version */
|
||||
public String version;
|
||||
public String getVersion()
|
||||
{
|
||||
return this.version;
|
||||
}
|
||||
|
||||
/** Workflow Definition Title (Localised) */
|
||||
public String title;
|
||||
public String getTitle()
|
||||
{
|
||||
return this.title;
|
||||
}
|
||||
|
||||
/** Workflow Definition Description (Localised) */
|
||||
public String description;
|
||||
public String getDescription()
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/** Task Definition for Workflow Start Task (Optional) */
|
||||
public WorkflowTaskDefinition startTaskDefinition;
|
||||
|
||||
public WorkflowTaskDefinition getStartTaskDefinition()
|
||||
{
|
||||
return this.startTaskDefinition;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
|
Reference in New Issue
Block a user