Thank you for the readme

-Steve


From: <onap-discuss@lists.onap.org> on behalf of Tal Liron <tli...@redhat.com>
Reply-To: "onap-discuss@lists.onap.org" <onap-discuss@lists.onap.org>, 
"tli...@redhat.com" <tli...@redhat.com>
Date: Thursday, July 26, 2018 at 9:07 AM
To: onap-discuss <onap-discuss@lists.onap.org>
Subject: Re: [onap-discuss] [SO] Weekly Meeting Minutes 7-25-2018

Hi Steve,

At your request I wrote a detailed README describing the solution and the 
example: 
https://github.com/tliron/puccini-bpmn/<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tliron_puccini-2Dbpmn_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=wl1FD1fND7cuPeOEzE0FYxXfWxXz4hQcW_2AWtLRQdA&e=>

For convenience, I will reproduce it here:
Features

The imports directory has everything needed to generate BPMN from TOSCA. 
Specifically there is 
bpmn.yaml<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tliron_puccini-2Dbpmn_blob_master_imports_bpmn.yaml&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=dNdhlhIFjwpk0aq_f8qmQwtK36nT7UKlnz8_Buf8VCU&e=>,
 which has the type information and in turn imports 
bpmn.js<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tliron_puccini-2Dbpmn_blob_master_imports_bpmn.js&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=VdPzf1BX7bl-4ZxS7AMZr4PzzMsiuH0fg6bg8tJg31o&e=>,
 which is the JavaScript code to generate BPMN.

Two TOSCA features (introduced in TOSCA 1.1) are supported:

Workflows

TOSCA declarative workflows are translated into BPMN processes. Because a TOSCA 
workflow is essentially a graph of steps with sequential and parallel sections, 
in BPMN we must represent the graph using parallel gateways, diverging or 
converging as the case may be, as well as conditional gateways to represent 
step success or failure. The JavaScript analyzes the graph and inserts the 
appropriate gateways between the steps.

Each step in TOSCA comprises zero or more activities that should happen in 
sequence. In BPMN, all the activities in the step become a single scriptTask 
entity. For now, we create a script made of pseudo-code that calls these 
activities. A complete solution would require a BPM orchestration environment 
and real code that would actually call node instances deployed in a cloud.

Once the BPMN process is imported into BPM software, you may include this 
process as a sub-process within other BPM processes. The workflow may or may 
not hand control back to another sub-process, so that it may or may not be a 
continuation of a control loop.

Policies and Policy Triggers

Policy triggers are also translated into BPMN processes. Because the trigger 
must be executed from within an orchestrator on node instances deployed in a 
cloud, within configurable time intervals or schedules, this BPM process 
essentially hands over control of the loop to the orchestrator. By launching a 
new sub-process when triggered, control is handed back to the business process: 
an open loop.

A single scriptTask entity is created for each target node of the policy, and 
all are executed in parallel using diverging/converging parallel gateways. A 
conditional gateway at the convergence is used to launch a new sub-process if 
any of the tasks succeed. Again, the script is made of pseudo-code that would 
call these operations within a BPM orchestration environment.

Example

Included is an example TOSCA service template, 
open-loop.yaml<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tliron_puccini-2Dbpmn_blob_master_open-2Dloop.yaml&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=iFiYk9ow9wzmmdlb6vlHRxxebiWlYuh81k74D7Y7JJo&e=>.
 This example demonstrates an open loop policy, notify_on_high_load, which has 
a trigger that runs an operation to get the CPU load on Compute nodes. If this 
operation returns true then a BPM process named NotifyUser would be launched.

Also included is a TOSCA workflow named backup, which comprises a step graph 
that calls an operation on an interface while making sure to set node states, 
notify on failure, etc. This generated BPMN process can be executed on its own, 
or included as a sub-process within larger business processes. Because it does 
not hand control back to any other process when done, it represents an end 
event within a control loop.

We've already included sample output of this example in 
open-loop.bpmn2<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tliron_puccini-2Dbpmn_blob_master_open-2Dloop.bpmn2&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=NrBOWJ3QNr7UKdyvZrEe3PCrzZBRve65REH0-SnF72A&e=>.

To recreate the output, run this command (tested with Puccini 0.2):

puccini-tosca compile open-loop.yaml | puccini-js exec bpmn -o open-loop.bpmn2

Also included is 
open-loop-design.bpmn2<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tliron_puccini-2Dbpmn_blob_master_open-2Dloop-2Ddesign.bpmn2&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=N0Wa3kMB5uCAs3nmwepI_HlMKCoT7GHTti0B3U4reEc&e=>,
 which is the same file with added diagram information so that it would appear 
more nicely in a BPMN GUI. We used the Eclipse BPMN2 
modeler<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.eclipse.org_bpmn2-2Dmodeler_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=SJl3qOG7SyLszHL6Ph4dGgKvZd43z7mzpHB8RQ-FwT8&e=>
 to edit the diagram.

You can import either file into your BPM software. Tested with 
jBPM<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.jbpm.org_&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=shs6nPzThSiGJml9VXN0Eg&m=JzO-UjYTbJGUMdAp-GBJsvFFs6ShpUxOx1OcnoUcxyA&s=W1qHS9fU6rfTyZgCQIfd6G0KXepK18Hxj3t4z-1bc1s&e=>
 7.8.0.

On Thu, Jul 26, 2018 at 6:51 AM Steve Smokowski 
<ss8...@att.com<mailto:ss8...@att.com>> wrote:
Is there a readme or walkthrough of how we can reproduce the demo shown?  Or 
can you share the command used to take Puccini and have it output the bpmn?

It appears to be something like

-Parse CSAR using Puccini
-Output to Clout
-Utilize Clout output to the javascript file to transform to bpmn



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11445): https://lists.onap.org/g/onap-discuss/message/11445
Mute This Topic: https://lists.onap.org/mt/23813337/21656
Group Owner: onap-discuss+ow...@lists.onap.org
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to