Refactored wcm client workflow models to use workflow 'name' not 'id'

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4435 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-11-23 18:02:21 +00:00
parent 5d18c75e08
commit e58bf45b96
8 changed files with 43 additions and 51 deletions

View File

@@ -203,14 +203,13 @@ public class CreateWebContentWizard extends BaseContentWizard
}
final NodeRef workflowRef = workflowRefs.get(0).getChildRef();
final String workflowId = (String)
this.nodeService.getProperty(workflowRef, ContentModel.PROP_WORKFLOW_ID);
if (workflowId == null)
final String workflowName = (String)this.nodeService.getProperty(workflowRef, ContentModel.PROP_WORKFLOW_NAME);
if (workflowName == null)
{
throw new RuntimeException("no workflow found for form " + formName);
}
System.err.println("using workflow " + workflowId + " for form " + formName);
wd = this.workflowService.getDefinitionById(workflowId);
System.err.println("using workflow " + workflowName + " for form " + formName);
wd = this.workflowService.getDefinitionByName("jbpm$" + workflowName);
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ContentReader cr = this.contentService.getReader(workflowRef, ContentModel.PROP_WORKFLOWDEFAULTS);