Output Business Process Task Procedures to Document

In Visual Paradigm user can define multiple set of working procedure to task and sub-process in business process diagram. The working procedures can be extracted from Doc. Composer and generate into a work manual.

Suppose we got the following BPD and with procedure defined on each task.

Task with procedures defined

To printout the procedures for each task:

  1. Go to Tools > Doc. Composer.

    Open Doc. Composer

  2. Select Build Doc from Scratch.

    Select Build from Scratch

  3. Switch to Diagram Navigator tab and select the Payment Process diagram.

    Select Payment Process diagram

  4. Right click on any template listed in Template Pane and select Duplicate… from popup menu.

    Duplicate an existing template

  5. In the Edit Template window, enter Process Task Procedures as the name of template.

    Name the tempalte as Process Task Procedures

  6. Replace the template code with the sample code below.
    <?xml version="1.0" encoding="UTF-8"?>
    <DiagramBaseInitiationBlock>
      
      <!-- Basic -->
      <Inline template="Basic (with anchor mark)"/>
        
      <Text style="@heading+">Task Procedures</Text>
      <ParagraphBreak/>
      
      <TableBlock colWidths="30, 70" tableStyle="Summaries">
        <TableRow>
          <TableCell>
            <Text>Task Name</Text>
          </TableCell>
          <TableCell>
            <Text>Procedures</Text>
          </TableCell>
        </TableRow>
        
        <IterationBlock modelType="BPTask">
          <Sortings>
            <Sorting by="property" property="x"/>
          </Sortings>
          <TableRow>
            <TableCell>
              <Property property="name"/>
            </TableCell>
            <TableCell>
              <HasValueChecker property="bpProcedures">
                <!-- Procedures -->
                <ForEach ignoreLastSeparator="false" property="bpProcedures">
                  <TableBlock repeatTableHeader="false" tableStyle="TableNormal">
                    <BPProcedureStepIterationBlock>
                      <TableRow>
                        <TableCell>
                          <BPProcedureStepIndent indentText="  "/>
                          <Property property="index"/>
                          <Text> </Text>
                          <Property property="name"/>
                        </TableCell>
                      </TableRow>
                    </BPProcedureStepIterationBlock>
                  </TableBlock>
                  <ParagraphBreak/>
                </ForEach>		
              </HasValueChecker>
            </TableCell>
          </TableRow>
        </IterationBlock>
      </TableBlock>
          
    </DiagramBaseInitiationBlock>
  7. Click OK.
  8. Now drag out the Process Task Procedures template onto document. The task and its procedures are shown in the document.

    Drag the template onto document to render the task and its procedures

Explanation of sample code

In the sample code we first retrieve the BP task element from diagram and sort according to its X position on diagram.

<IterationBlock modelType="BPTask">
  <Sortings>
    <Sorting by="property" property="x"/>
  </Sortings>

After that we retrieve the bpProcedures property from the task and walk through them one by one.

<HasValueChecker property="bpProcedures">
  <!-- Procedures -->
  <ForEach ignoreLastSeparator="false" property="bpProcedures">
    <TableBlock repeatTableHeader="false" tableStyle="TableNormal">

Next we use the BPProcedureStepIterationBlock to retrieve the step within procedure and printout its index and name.

<BPProcedureStepIterationBlock>
  <TableRow>
    <TableCell>
      <BPProcedureStepIndent indentText="  "/>
      <Property property="index"/>
      <Text> </Text>
      <Property property="name"/>
    </TableCell>
  </TableRow>
</BPProcedureStepIterationBlock>

Using in Fill-in Doc.

The customized template can also being used in Fill-in doc approach of Doc. Composer. To use in Fill-in Doc you can specify the Doc. Field as

${DIAGRAM, “BusinessProcessDiagram”, BusinessProcessDiagram, One, “Process Task Procedures”}

After import the Doc. Base you can select the target business process diagram for inserting data in your word file.

Using template in Fill-in Doc

Related Know-how

Related Link

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply