Sustainable Service Design is a practical approach to design and implement software services with a great level of reuse both at technical and business levels. It is based on the following four principles:
|If you want to know more, please read my latest article about sustainable service design which has been publised in issue 2.2015 of Javamagazin (German).The interview can be found on the jaxenter site.|
In the next issue 3.2015 I am going to show how to implement sustainable services with JEE and JBoss Widfly.]]>
On 25.6.-26.6. June BiPRO-Day 2014 is going to take place in Düsseldorf Germany.
At the event I am going to give a live coding session. In particular I am going to show how to implement and secure BiPRO services using current Web Service standards such as JAX-WS, SAML, WS-Security and WS-SecureConversation. Attendees can see how the implementation works with JBoss Wildfly, Apache CXF and .NET. Moreover they can take a peek into the future of BiPRO standards in the area of security.
I hope to see you there!
Typical reasons are
How can we calculate the velocity for those dynamic teams? By taking capacity into account and combining it with the team velocity. I can recommend following procedure that I used on several projects with very good results.
The advantages of capacity based velocity are:
Status, certainty, autonomy, relatedness . . . → Read More: Understand your Team with SCARF]]>
Status, certainty, autonomy, relatedness and fairness
Here are some ideas what you can do to minimize reactions of avoidance in your Scrum team:
Keeping those factors in mind can help to better understand peoples reactions and adapt your own behavior so that it minimizes reactions of avoidance.]]>
Those factors are based on experience I’ve made in projects ranging from small to very large sizes.]]>
In this blogpost I would like to show you how data looks like in BPMN and how a process can be linked in a standardized way to existing services based on WSDL and XSD.
The process is as simple as possible. The service is based on a BiPRO service description. The BiPRO is a standardization organisation in the German insurance market that standardizes processes and services at a technical and business level.
Below you see a simplyfied version in plain BPMN (when you import the bpmn below you will only see the events and tasks).
<?xml version="1.0" encoding="UTF-8"?> <definitions id="definitions" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.pleus.net/example" xmlns:tns="http://www.pleus.net/example" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nachrichten="http://www.bipro.net/namespace/nachrichten" xmlns:bipro="http://www.bipro.net/namespace" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL http://bpmn.sourceforge.net/schemas/BPMN20.xsd"> <!-- WSDL Import --> <import importType="http://schemas.xmlsoap.org/wsdl/" location="KompsitService_22.214.171.124.1.wsdl" namespace="http://www.bipro.net/namespace" /> <!-- Item definition. Link to the external WSDL/XSD structure. structureRef: QName of input element --> <itemDefinition id="getQuoteRequestItem" structureRef="nachrichten:getQuote" /> <itemDefinition id="getQuoteResponseItem" structureRef="nachrichten:getQuoteResponse" /> <!-- Message definitions. Link to the item definition. Can be visualized by using DI --> <message id="getQuoteRequestMessage" itemRef="tns:getQuoteRequestItem" /> <message id="getQuoteResponseMessage" itemRef="tns:getQuoteResponseItem" /> <!-- Interface definition. implementationRef = QName of WSDL Port Type --> <interface name="Komposit Interface" implementationRef="bipro:KompositServicePortType"> <!-- Operation: implementationRef = QName of WSDL Operation --> <operation id="getQuoteOperation" name="getQuote Operation" implementationRef="bipro:getQuote"> <!-- Links to the message definitions --> <inMessageRef>tns:getQuoteRequestMessage</inMessageRef> <outMessageRef>tns:getQuoteResponseMessage</outMessageRef> </operation> </interface> <process id="servicecall"> <!-- Datasources and targets for the service call (process state). Can be visualized by using DI and dataObjectReferences --> <dataObject id="dataInputOfProcess" name="Input for webservice" itemSubjectRef="xs:string"/> <dataObject id="dataOutputOfProcess" name="Output for webservice" itemSubjectRef="xs:string"/> <!-- Process start --> <startEvent id="start" /> <sequenceFlow id="flow1" sourceRef="start" targetRef="initScript" /> <!-- Initialization of process data --> <scriptTask id="initScript" scriptFormat="groovy" name="Initialize process"> <script> def temp = "126.96.36.199.1" execution.setVariable("dataInputOfProcess", temp) </script> </scriptTask> <sequenceFlow id="flow2" sourceRef="initScript" targetRef="webService" /> <!-- Web Service call --> <serviceTask id="webService" name="Call getQuote" implementation="##WebService" operationRef="tns:getQuoteOperation"> <!-- Defines the inputs and outputs and links to item definitions --> <ioSpecification> <dataInput itemSubjectRef="tns:getQuoteRequestItem" id="dataInputOfServiceTask" /> <dataOutput itemSubjectRef="tns:getQuoteResponseItem" id="dataOutputOfServiceTask" /> <inputSet> <dataInputRefs>dataInputOfServiceTask</dataInputRefs> </inputSet> <outputSet> <dataOutputRefs>dataOutputOfServiceTask</dataOutputRefs> </outputSet> </ioSpecification> <!-- Defines the mapping between process data and service input --> <dataInputAssociation> <sourceRef>dataInputOfProcess</sourceRef> <targetRef>dataInputOfServiceTask</targetRef> <assignment> <from> bpmn:getDataObject('dataInputOfProcess') </from> <to> bpmn:getDataInput('dataInputOfServiceTask')/BiPROVersion/ </to> </assignment> </dataInputAssociation> <!-- Defines the mapping between process data and service output --> <dataOutputAssociation> <sourceRef>dataOutputOfServiceTask</sourceRef> <targetRef>dataOutputOfProcess</targetRef> <assignment> <from> bpmn:getDataOutput('dataOutputOfServiceTask')/BiPROVersion/ </from> <to> bpmn:getDataObject('dataOutputOfProcess') </to> </assignment> </dataOutputAssociation> </serviceTask> <sequenceFlow id="flow3" sourceRef="webService" targetRef="end" /> <!-- Process end --> <endEvent id="end" /> </process>
Now let’s look at the example step-by-step.
1. Import the service: Line 16-18 imports the WSDL file that includes the types and messages used by the external service that we want to call from the process.
2. Define the items: Line 21-22 defines items that act as links to the types defined in the imported WSDL and XSD files.
3. Define the messages: Line 25-26 defines messages to be used in the interface definition that we see in the next step. Messages can be visualized by modeling tools provided that DI Information is present in the model.
4. Define the interface: The interface is the equivalent to the WSDL port type in BPMN. It is defined in line 29-36. So far we have itemDefinitions that link to the XSD-messages and an interface that links to the WSDL-port type. The inMessageRef and outMessageRef elements use the messages defined in step 3 to indirectly reference the itemDefinitions.
5. Define the process variables: The process maintains state. This state is defined in the form of dataObjects in line 41-42. Please note that the links to the external service are defined outside the process (which begins in line 38). The dataObjects are defined inside the process as they represent the data that is maintained by the respective process instances. By the way, when importing the process in a modeling tool, dataObjects are not visualized. To visualize dataObjects as a paper sheet, dataObjectReferences can be used. In this simple example we just use a string as input and output which transports a version information send to the BiPRO service and back. In a more complex senario this could be a type from an imported XSD.
6. Initialize the process: A simple BPMN script task (line 50-55) is used to initialize the dataObject dataInputOfProcess. It just sets the version to 188.8.131.52.1.
7. Link the serviceTask: The most complex part is the serviceTask (line 60-102). The operationRef attribute (line 60) links to the operation which is part of the interface definition (line 31). This is the web service operation to be called when the serviceTask is executed. The serviceTask comprises the elements ioSpecification (line 63-72), dataInputAssociation(line 75-86) and dataOutputAssociation (line 89-100). ioSpecification can be seen as a logical port that describes the service input and output from the perspective of the service. The itemSubjectRef attribute on the dataInput and dataOutput elements (line 64-65) link to the itemDefinitions (line 21-22) and as such to the data structures in the WSDL files. The id together with the inputSet and outputSet (line 66-71) define the connection points the serviceTask offers for sending and receiving data. dataInputAssociation and dataOutputAssociation map the dataObjects (process data) to the connection points or in other words to the request and response structures of the service (service data).
When the serviceTask webService is called, the process data from the dataObject dataInputOfProcess is copied to the web service request message nachrichten:getQuote/BIPROVersion. Then the service is called. After the service call finished, the version is copied from the response message nachrichten:getQuoteResponse/BIPROVersion to the dataObject dataOutputOfProcess.
This blogpost has shown how to link WSDL/XSD based services to BPMN processes in a standardized way.
Even if automated process execution is not in focus, it can be important to unambiguously link services to processes to create an integrated view of the entire process including its data.
I am now entitled to deliver the official trainings from the Microsoft Official Curriculum such as:
I am now entitled to deliver the official trainings from the Microsoft Official Curriculum such as:
If you are not sure whether Windows App development is the right thing for you or if you just want to get a feeling for the tooling, technologies and the development process you should attend my Windows Store Apps development workshop which is offered as in-house training.
Windows Apps will soon be availabe on most office workstations. Learning how to develop it is a great opportunity to be at the fore front to deliver compelling user experience. Don’t miss it!
The app acts a a host of typical games that are utilized in agile projects. The first game is planning poker which can be now played by distributed teams over the internet. Other games . . . → Read More: Agile Games Released]]>
If you want to know to develop how those apps, please attend the Windows Store App Development Workshop. I think Windows Apps have a great potential. They are well suited to reach users in a modern way. Most business workstations today are equipped with Windows so the market is huge. Let’s start coding!
Step 1: Create the process
First we create a simple BPMN2.0 process like the one below using our tool of choice. In this case it was created with Signavio Modeler.
If we open the bpmn file in a text editor it looks like this:
What we see is that in addition to the actual process information it contains elements named BPMNShape and BPMNEdge. BPMNShape contains the bounds of the shape whereas BPMNEdge contains the path of the respective shape connector. This is the diagram interchange format which specifies the size and location of the graphical elements and paths.
Step 2: Prepare the HTML page
We need a simple HTML page that loads the required scripts for jQuery, XMLJS, Raphael and of course our own script bpmnjs.js.
The textarea element (line 20) contains the BPMN data. It is omitted here for the sake of readability.
The div element (line 23) specifies the drawing area that is needed to output the graphics.
Both are needed to initialize BPMNJS in the document ready event (line 14-15).
Step 3: Parse the DI elements using XMLJS
The following listing shows the parsing loop for the BPMN shapes within the plot function of BPMNJS.
First the XMLJS dom parser is initialized (line 49-51). The bpmndi namespace is determined in the getNamespaces function at line 54. Line 57 obtains all shapes. The rest of the listing iterates over the shapes, gets positions, sizes and bpmnElement-ids of the related BPMN elements and passes them to the paintShape function which performs the painting. The parsing loop for the edges is almost identical. The simplest possible paintShape implementation would look like the following.
The constructor function (lines 2-4) connects Raphael with our div and stores the Raphael instance in a variable called paper. The paper is used in the function paintShape which draws a simple rectangle using the given coordinates (line 8).
The result looks like this:
Step 4: Find related process elements
In order to draw specific BPMN elements we have to determine the element type. The bpmnElement attribute that we have got in step 3 helps us to do that. We use it to get the process element by issuing an xPath expression on the DOM as you can see in the next listing (line 128).
The localName of the element is the name of the BPMN element an therefore the type such as startEvent. With this information we can implement a dispatcher to draw all BPMN elements individually (lines 130-133).
Step 5: Draw elements using Raphael and CSS
The next listing shows an implementation to draw a basic BPMN task.
After implementing some more type specific paint functions the result looks like this:
Step 6: Highlight paths
One of the advantages of painting the BPMN model at runtime over a static JPG like the one shown in step 1 is that it allows interactivity. For instance we could highlight the actual token flow in the model. To do that we need information about the executed BPMN steps. This can typically be obtained from a process tracking system which is part of almost every BPM product. To achieve highlighting we extend the getCss function to return a different class if the current shape is in the list of already executed steps.
We add the postfix -high to the CSS class in case the element should be highlighted. By specifying for example the class .task-high we can achieve highlighting for shapes and edges. The result is show below.
Step 7: Add interactivity
Finally we can even add interactivity to the model with a little help from Raphael.
As this can not be demonstrated using static images you can find an interactive version here. In this version you can hover over and click individual shapes to make them react.
About BiPRO day:
“Einmal im Jahr treffen sich die Mitglieder des BiPRO e.V. sowie Interessierte aus der Versicherungs- und Finanzdienstleistungsbranche zum BiPRO-Tag. Dabei stehen aktuelle und zukünftige Themenfelder der Prozessoptimierung allgemein und des BiPRO e.V. im Speziellen im Vordergrund. Dazu zählen Vorträge und Präsentationen aus laufenden und bevorstehenden Projekten, die Vorstellung neuer Normen sowie Berichte über Norm-Implementierungen bei den Mitgliedsunternehmen des Vereins.”