[Hippo-cms7-user] Using a workflow to create a new document programatically

d.clayton d.clayton at lukkien.com
Thu Oct 13 12:10:11 CEST 2011

Hello again list/forums!

I'm trying to create a new document programatically. After looking through
other forum threads it seems I should be using a workflow to do this. I got
this far:

		WorkflowPersistenceManager wpm =
		HippoBean content = getContentBean(request);
		Workflow wf = wpm.getWorkflow("default", content.getNode());
		if(wf instanceof FolderWorkflow) {
			FolderWorkflow fw = (FolderWorkflow)wf;
			wf.add(uh oh)

The documentation for FolderWorkflow.add doesn't seem very clear, and when I
run that code I get the following:

[INFO] [talledLocalContainer] 13.10.2011 12:08:52 WARN 
This change needs merge semantics. Can't create instruction.
[INFO] [talledLocalContainer] 13.10.2011 12:08:52 WARN 
Unable to create instruction. This change will be lost

How should I create a document in the CMS in Java code?


View this message in context: http://hippo.2275632.n2.nabble.com/Using-a-workflow-to-create-a-new-document-programatically-tp6888352p6888352.html
Sent from the Hippo CMS 7 mailing list archive at Nabble.com.

More information about the Hippo-cms7-user mailing list