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)
|
protected WorkflowDefinition createWorkflowDefinition(ProcessDefinition definition)
|
||||||
{
|
{
|
||||||
WorkflowDefinition workflowDef = new WorkflowDefinition();
|
final Task startTask = definition.getTaskMgmtDefinition().getStartTask();
|
||||||
workflowDef.id = createGlobalId(new Long(definition.getId()).toString());
|
final String name = definition.getName();
|
||||||
workflowDef.name = definition.getName();
|
final String title = getLabel(name + ".workflow", TITLE_LABEL, name);
|
||||||
workflowDef.title = getLabel(workflowDef.name + ".workflow", TITLE_LABEL, workflowDef.name);
|
final String description = getLabel(name + ".workflow", DESC_LABEL, title);
|
||||||
workflowDef.description = getLabel(workflowDef.name + ".workflow", DESC_LABEL, workflowDef.title);
|
return new WorkflowDefinition(createGlobalId(new Long(definition.getId()).toString()),
|
||||||
workflowDef.version = new Integer(definition.getVersion()).toString();
|
name,
|
||||||
Task startTask = definition.getTaskMgmtDefinition().getStartTask();
|
new Integer(definition.getVersion()).toString(),
|
||||||
if (startTask != null)
|
title,
|
||||||
{
|
description,
|
||||||
workflowDef.startTaskDefinition = createWorkflowTaskDefinition(startTask);
|
(startTask != null
|
||||||
}
|
? createWorkflowTaskDefinition(startTask)
|
||||||
return workflowDef;
|
: null));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -24,24 +24,65 @@ package org.alfresco.service.cmr.workflow;
|
|||||||
*/
|
*/
|
||||||
public class WorkflowDefinition
|
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 */
|
/** Workflow Definition unique id */
|
||||||
public String id;
|
public String getId()
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Workflow Definition name */
|
/** Workflow Definition name */
|
||||||
public String name;
|
public String getName()
|
||||||
|
{
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
/** Workflow Definition version */
|
/** Workflow Definition version */
|
||||||
public String version;
|
public String getVersion()
|
||||||
|
{
|
||||||
|
return this.version;
|
||||||
|
}
|
||||||
|
|
||||||
/** Workflow Definition Title (Localised) */
|
/** Workflow Definition Title (Localised) */
|
||||||
public String title;
|
public String getTitle()
|
||||||
|
{
|
||||||
|
return this.title;
|
||||||
|
}
|
||||||
|
|
||||||
/** Workflow Definition Description (Localised) */
|
/** Workflow Definition Description (Localised) */
|
||||||
public String description;
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return this.description;
|
||||||
|
}
|
||||||
|
|
||||||
/** Task Definition for Workflow Start Task (Optional) */
|
/** Task Definition for Workflow Start Task (Optional) */
|
||||||
public WorkflowTaskDefinition startTaskDefinition;
|
public WorkflowTaskDefinition getStartTaskDefinition()
|
||||||
|
{
|
||||||
|
return this.startTaskDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see java.lang.Object#toString()
|
* @see java.lang.Object#toString()
|
||||||
|
Reference in New Issue
Block a user