Automation chain for converting to PDF and publishing to a user selected section location.

Platform: Nuxeo 5.6 LTS

Server OS: Ubuntu 13.04

edit From the research I have been doing, it appears that I must use MVEL for this. Is there ANY way to REQUIRE user input (such as the user selecting the SECTION the document is supposed to be published to)? This (what I thought was) small test will actually go into something much bigger, I.E.: into an automated workflow so when the final Approver approves the document, it will be PUBLISHED as a PDF file in the section that the ORIGINATOR designates in the first step of the workflow. /edit

Here is what I have accomplished so far: I have created a user action that places a button in the edit page of a document. When clicked, this button launches an automation chain. This automation chain publishes the document to a specific location. (This was adapted from Create a button that triggers the task assignment.)

Now, what I would like to do, and I don't know how to go about this, or if it is even possible is this: A user clicks the button and is presented with the options on where to publish the document, similar to the publish tab in a document in the workspace. Then, the automation chain should convert the document to PDF, then publish that PDF document to the section the user specified. Here is what for the automation chain so far:

Fetch -> Context Document(s)
Push & Pop -> Push Document
Conversion -> Convert to PDF
Push & Pop -> Pop Document
Execution Context -> Set Context Variable
    name: publishing_path
    value: expr:@{Document.path}
Push & Pop -> Push Document
Fetch -> Query
    query: SELECT * FROM Document WHERE ecm:path STARTSWITH '@{Document.path}'
    language: NXQL
Document -> Snapshot Version
    increment: Major
Document -> Publish Document
    target: expr:publishing_path
    override: (checked)

I know I'm missing a few steps and I haven't been able to figure them out. The first is how to allow the user to select the section to publish the document to. Second, I just want the PDF version published and not added to the document in the user's workspace.

Any insight would be greatly appreciated. Thank you.

0 votes

0 answers

2946 views

ANSWER