<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sameh Ahmed on Medium]]></title>
        <description><![CDATA[Stories by Sameh Ahmed on Medium]]></description>
        <link>https://medium.com/@sameh.ahmed?source=rss-edd19cb7adcb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UAXq2JZXwUPpIBC8.</url>
            <title>Stories by Sameh Ahmed on Medium</title>
            <link>https://medium.com/@sameh.ahmed?source=rss-edd19cb7adcb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:46:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sameh.ahmed/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[IBM BPM DevOps practices]]></title>
            <link>https://medium.com/sameh-nasef/ibm-bpm-devops-practices-73773e9984b6?source=rss-edd19cb7adcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/73773e9984b6</guid>
            <dc:creator><![CDATA[Sameh Ahmed]]></dc:creator>
            <pubDate>Mon, 20 Jul 2020 12:13:55 GMT</pubDate>
            <atom:updated>2024-10-08T13:51:01.464Z</atom:updated>
            <content:encoded><![CDATA[<h3>IBM BAW DevOps practices</h3><h3>Applying CI/CD to BAW projects using Azure pipeline</h3><p>Co-Author: <a href="https://medium.com/u/84d6098ca1f6">M.Fadin</a></p><p>Continuous Delivery is a well-known DevOps practice to build, test, deploy application changes in an incremental fashion to multiple environments all the way to production, at any point of time. Having said that, Organizations usually tends to unify their application deployment processes to achieve that. However, when it comes to IBM BPM — the famous business process management platform for enterprises by IBM — Organizations often think that it’s not integrate-able with the available DevOps solutions like Jenkins, UrbanCode Deploy, Azure DevOps, etc. This might be due to the fact that IBM BPM/BAW has its own built-in tools to support the BPM development lifecycle like:</p><ul><li>Source Code Management</li><li>Version control and team management</li><li>Automatic Build</li><li>Automatic deployment through online deployment or offline</li><li>Release management by activating the governance process</li></ul><p>In this tutorial we will demonstrate how you can automate your IBM BPM integration and deployment activities into Microsoft Azure DevOps Pipeline.</p><h4><strong>Continuous Integration:</strong></h4><p>During a typical IBM BPM project, developers spend most of their time in the Process Designer authoring environments against a current version of an application which is contained in the tip (for example, the “head” revision).</p><p>To implement a continuous integration effectively, the development team must adopt an automated practice of pulling multiple snapshots (for example, the “label” revision) then installing or deploying those snapshots to the Process Server, and run tests against them.</p><blockquote>When testing from the “tip” while a development is in-progress, which often result in an unstable version; full of missing and unstitched pieces — not to mention, uncaught bugs as well. A common solution to this problem would be to cut a snapshot at a specific time manually or automatically using DevOps tools, then pushed to the Dev/Test Process Server environment.</blockquote><p>In the end, Continuous Delivery can sometimes be seen as a challenge for many organizations, due to the much changes it brings, and the “will” to accept. This is why we always advise clients to jump into the DevOps journey with a parachute by thoroughly understanding your challenges and slowly adopting automation and DevOps practices.</p><p>A more regular cadence of bi-weekly or monthly can be established. However, even this approach can be a challenge in some organizations.</p><h4><strong>Triggering BPM Commands using Azure DevOps Pipeline:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*mFthkj9KyS1LE9MLsD2aIw.png" /></figure><p>Despite not having an out-of-the-box integration between Azure DevOps and IBM BPM, we can still achieve an acceptable automation leveraging the power of scripting and Jython language. “WSAdmin” command line tool, allows you to trigger an external bash script file using the flag “-f”. From past experience, having an atomic job/script for a specific purpose works best when it comes to scripts maintainability and pipeline view. E.g. Create Snapshot, Install Offline Snapshot, etc</p><p><strong>Does this applies for other DevOps tools as well?</strong></p><p>Definitely! we usually recommend clients to establish their automation workflows using IBM UrbanCode Deploy due to the fact that UrbanCode Deploy offers out-of-the box plugins to integrate with IBM BPM. Nonetheless, automation can be achieved as long as the solution you’re trying to automate offers APIs for integration (API First Design).</p><p><strong>Command Line:</strong></p><pre>wsadmin.sh -conntype SOAP -f /azure-scripts/createSnapshot.py -port 8880 -host ${BPMDevServer} -user $(bpmUsername) -password $(bpmPassword) -lang jython $(snapshotName)</pre><p>As you can see from the command line above, once the “wsadmin” connection via SOAP is established with the ProcessCenter Server, the “CreateSnapshot.py” script will gets triggered.</p><p><strong>Script file content example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*RfZC2qOpYHDdctcDK43oKg.png" /></figure><p>Once you have successfully built your Jython scripts, the next step is to start to populate the commands and the environment properties in Azure DevOps Pipeline as depicted below image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*wFwQJXZhTjrvOSgBsvLZzw.png" /></figure><p>Notice in our example above, that we have a Job called “CP4Automation” (you can call it “Passport Renew Flow App” for example) , which was created in our Azure Pipeline, along with the list of <strong>steps</strong> related to the job<strong>, like </strong>“Create a Snapshot” and its respective commands that will only trigger the “CreateSnapshot.py” script.</p><p>Once the job is triggered either manually or via code commit, Azure Pipeline will trigger the job as depicted in the image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*CRGfaC84rZbAFwj2tyoeUA.png" /></figure><p>Finally, today we have demonstrated a single job automation to create a workflow snapshot and install it on an Online Process Server. However, IBM BPM offers a list of tasks that will allow you to fully automate and promote your BPM deployments:</p><ul><li>Create Generic Install Package</li><li>Deactivate Snapshot</li><li>Deploy Offline Package</li><li>Deploy Process Application Snapshot</li><li>Export Process Application</li><li>Extract Migration Policy</li><li>Generate Offline Package</li><li>Import Process Application</li><li>Install Process Application Snapshot</li><li>Migrate Instances</li><li>Set Default Snapshot</li><li>Stop Snapshot</li><li>Sync Values, Variables, and Team Bindings</li><li>Update Installation Information</li></ul><h3><strong>Sample tasks commands</strong></h3><ul><li>Use the <strong>BPMCreateSnapshot</strong> command in connected mode from Workflow Center to create snapshots for process applications or toolkits. You can run this command only on Workflow Center</li></ul><pre>wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython</pre><pre>wsadmin&gt;AdminTask.BPMCreateSnapshot(“[-containerAcronym TPA -containerSnapshotName SS1 -containerSnapshotDescription ‘0824snapshot’]”)</pre><ul><li>Use the <strong>BPMInstall</strong> command in connected mode from a Workflow Center server to install a process application snapshot on an online workflow server.</li></ul><pre>wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython</pre><pre>wsadmin&gt;AdminTask.BPMInstall(‘[-containerAcronym BILLDISP -containerSnapshotAcronym SS2.0.1 -containerTrackAcronym Main -serverName ProcessServer01 -skipGovernance false]’)</pre><ul><li>If you want to install a snapshot on an offline Workflow Server, use the <strong>BPMExtractOfflinePackage</strong> command in connected mode from a Workflow Center server to extract the installation package to a file. The extracted file can then be installed on the offline Workflow Server.</li><li>Use this command to create an installation package for a process application snapshot on the Workflow Center server.</li></ul><pre>wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython</pre><pre>wsadmin&gt;AdminTask.BPMCreateOfflinePackage(‘[-containerAcronym BILLDISP -containerSnapshotAcronym SS2.0.1 -containerTrackAcronym Main -serverName processServer315 -skipGovernance false]’)</pre><pre>wsadmin&gt;AdminTask.BPMExtractOfflinePackage(‘[-containerAcronym BILLDISP -containerSnapshotAcronym SS2.0.1 -containerTrackAcronym Main -serverName processServer315 -outputFile C:/myProcessApps/BILLDISP201.zip]’)</pre><ul><li>Use the <strong>BPMInstallOfflinePackage</strong> command in connected mode from a workflow server to install a snapshot from a custom installation package on the workflow server.</li></ul><pre>wsadmin -conntype SOAP -port 8880 -host ProcessServer.mycompany.com -user admin -password admin -lang jython</pre><pre>wsadmin&gt;AdminTask.BPMInstallOfflinePackage(‘[-inputFile C:/myProcessApps/BillingDispute.zip]’)</pre><ul><li>Use the <strong>BPMExport</strong> command to exchange a process application or toolkit between Workflow Center servers. You must run the command in connected mode from a Workflow Center serve</li></ul><pre>wsadmin -conntype SOAP -port 8880 -host ProcessCenterServer01.mycompany.com -user admin -password admin -lang jython</pre><pre>wsadmin&gt;AdminTask.BPMExport(‘[-containerAcronym BILLDISP -containerSnapshotAcronym SS2.0.1 -containerTrackAcronym Main -outputFile C:\processApps\BILLDISP201.twx]’)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73773e9984b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sameh-nasef/ibm-bpm-devops-practices-73773e9984b6">IBM BPM DevOps practices</a> was originally published in <a href="https://medium.com/sameh-nasef">Sameh Nasef</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to generate PDF documents in IBM BPM / BAW]]></title>
            <link>https://medium.com/sameh-nasef/how-to-generate-pdf-documents-in-ibm-bpm-baw-ad42bfdd8867?source=rss-edd19cb7adcb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad42bfdd8867</guid>
            <category><![CDATA[business-automation]]></category>
            <category><![CDATA[ibm-baw]]></category>
            <category><![CDATA[pdf-template]]></category>
            <category><![CDATA[generate-pdf]]></category>
            <category><![CDATA[ibm-bpm]]></category>
            <dc:creator><![CDATA[Sameh Ahmed]]></dc:creator>
            <pubDate>Fri, 24 Apr 2020 12:59:02 GMT</pubDate>
            <atom:updated>2021-06-13T09:49:24.826Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction</p><p>One of the common requirements from BPM customers is generating a consumer document like an invoice or legal document PDFs based on IBM BPM process data and store the it within the content/Document management system.</p><p>There are several options , this tutorial will guide you toward the simplest way to do it.</p><p>1- Print a coach to PDF</p><p>This may be a direct solution that works for many situations, you can simply use your browser&#39;s built-in functionality to turn your coach into a PDF or have some script or control to print the coach . But I don’t find this a preferred solution as it requires to design and style your coach in a printer friendly format , It also requires maintenance and update of the process application if you need to change the document format or look and feel.</p><p>2- Generate a PDF based on a template</p><p>If you are creating a well-defined document such as an invoice, contract or a letter document, For sure the best way will be generating your PDF using a template. A key factor here is to find an easy way to visually design the template and to easily generate the document from the template within process flow.</p><p>In this tutorial, we will explore a quick and easy way using PDFGeneratorAPI.PDFGeneratorAPI.com allows you to design templates in the cloud and make a REST API call to create and retrieve documents.</p><p><strong>You can get full implementation here</strong> <a href="https://ibm.box.com/v/baw-pdfgenerator">https://ibm.box.com/v/baw-generate-pdf</a></p><h4>A- Prepare the data object and the PDF template</h4><p>After implementing your process/coach, prepare a json format for your process data that you will pass to the template for generating the variable . the easiest way is print out the json form of your BPM Process variable to console using client script</p><pre>console.log(JSON.stringify(tw.local.MissionRequestInfo));</pre><p>Sample output below , This sample will be used for designing the template</p><pre><em>{</em></pre><pre><em>&quot;Subject&quot;: &quot;Trip&quot;,</em></pre><pre><em>&quot;Missions&quot;: [{</em></pre><pre><em>&quot;MissioninArabic&quot;: &quot;Sameh&quot;,</em></pre><pre><em>&quot;MissioninEnglish&quot;: &quot;Sameh&quot;,</em></pre><pre><em>&quot;StartDate&quot;: &quot;2020-03-25&quot;,</em></pre><pre><em>&quot;EndDate&quot;: &quot;2020-03-30&quot;,</em></pre><pre><em>&quot;Country&quot;: &quot;FR&quot;,</em></pre><pre><em>&quot;City&quot;: &quot;Paris&quot;,</em></pre><pre><em>&quot;Note&quot;: &quot;Note&quot;</em></pre><pre><em>}</em></pre><pre><em>],</em></pre><pre><em>&quot;Delegates&quot;: [{</em></pre><pre><em>&quot;PlayerName&quot;: &quot;Sameh&quot;,</em></pre><pre><em>&quot;PlayerNumber&quot;: &quot;22&quot;,</em></pre><pre><em>&quot;ArabicName&quot;: &quot;sameh&quot;,</em></pre><pre><em>&quot;others&quot;: &quot;&quot;</em></pre><pre><em>}</em></pre><pre><em>],</em></pre><pre><em>&quot;FederationNote&quot;: &quot;&quot;,</em></pre><pre><em>&quot;Status&quot;: &quot;&quot;</em></pre><pre><em>}</em></pre><p>Use <a href="http://pdfgeneratorapi.com/">pdfgeneratorapi.com</a> to create your template, It will ask for the JSON file or json data object . use the sample object to assign data to different forms in the template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IPYjE6OHV8Tuaqp69LuqQ.png" /></figure><h4>B- Implement a service flow to generate the document and store it to the ECM system</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjHrXvZAqFi5FEYqfTWomg.png" /></figure><p>First step to have an service to call the pdfgenerator API to generate the pdf file. Unfortunately BPM/BAW discovery service is unable to discover the APIs published by pdfgeneratorapi (compatibility issues) , so I used <strong>swagger inspector</strong> to call the API and built API definition that can be discovered using BAW external service wizard. Please use the yaml file <a href="https://ibm.box.com/v/bawpdfapiyaml">here</a> or export it directly from swaggerhub <a href="https://app.swaggerhub.com/apis/samehn/GeneratePDF/0.1">https://app.swaggerhub.com/apis/samehn/GeneratePDF/0.1</a></p><p>Create an external service and let BAW discover the API and generate data objects</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5E-Z622HW5OtGEeAUi3PYw.png" /></figure><ul><li>Call the external service as first step in the service flow. It will require your PDFGenerator apiKey, workspace , and signature . check here how to get you apikey and create your signature. <a href="https://docs.pdfgeneratorapi.com/#auth">https://docs.pdfgeneratorapi.com/#auth</a> . Last parameter is pass the process variable object has the values you want to pass for the template to be generated. The response is the pdf file as base64 stream.</li><li>Create content stream object from the pdf base64 string</li></ul><pre>tw.local.contentStream = new tw.object.ECMContentStream();</pre><pre>tw.local.contentStream.content = tw.local.data.response;</pre><pre>tw.local.contentStream.contentLength =tw.local.data.response.length;</pre><pre>tw.local.contentStream.mimeType = ‘application/pdf’;</pre><ul><li>Create a document in the ECM system using content integration task set the operation to Create Document and map the content stream object and document name. store the document ecmID in local variable</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EGCjhW_YZR5q1CUatjk9jw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bj2VlB05dKDrRnvCMswNKw.png" /></figure><ul><li>We will retrieve the document object to get the direct URL in the ECM system. So create a content integration task with operation get document and map the document ecmID returned in the previous step</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FLHx-Of4V1-zmw4FAf7eoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BUdd17bkq6o3JNqY12cXBA.png" /></figure><ul><li>use a server script Retrieve URL to extract the document URL</li></ul><pre>tw.local.urlOfPDF = tw.local.document.contentURL;</pre><p>You can see a sample run of the scenario <a href="https://ibm.box.com/v/baw-pdfgenerator">here</a></p><h4>Conclusion</h4><p>there are several approaches that can be used to solve this problem</p><p>Next tutorial, we will explore generating the PDF document using HTML template and a PDF libraries. There are several third-party libraries out there, including, PDFKit, and Apache PDFBox , iText</p><p>If you need assistance with any of these approaches, feel free to reach out for more information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad42bfdd8867" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sameh-nasef/how-to-generate-pdf-documents-in-ibm-bpm-baw-ad42bfdd8867">How to generate PDF documents in IBM BPM / BAW</a> was originally published in <a href="https://medium.com/sameh-nasef">Sameh Nasef</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>