BPM, Workflow, and Case

 View Only
Expand all | Collapse all

Deploy app for custom widget in CP4Automation

  • 1.  Deploy app for custom widget in CP4Automation

    Posted Wed July 29, 2020 05:12 PM
    I have a case template 5.2.1 case template which i deployed successfully and also deployed and registered custom widgets to the target environment.
    When I access the case pages which uses custom widgets, it throwing an error on missing JS (javascript files).
    The custom widgets calls JS found in a WAR file.
    My question is how to deploy custom application (WAR, EAR) to the workflow server (which is a container using liberty profile)

    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------


  • 2.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri July 31, 2020 12:01 AM
    Hello Pandian
    If I understand your question correctly, You can deploy the application using Application Server console.  Are you able to access it from your localhost or host name /port you configured for that container?

    When you open the console, there is an option "Applications" on left hand side from where you can deploy the custom applications.

    Thanks, Pramod

    ------------------------------
    PRAMOD PANT
    IBM
    ------------------------------



  • 3.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri July 31, 2020 09:19 AM
    Pramod,

    I'm running CP4Automation on a OpenShift cluster and installed BAW as a demo/evaluation copy. I was able to deploy custom widgets and register it but the WAR files are not getting deployed to the Workflow.
    BAW and Content navigator for CP4Automation comes with Websphere liberty with no AdminCenter. I know we can use Application Server console to deploy apps but in this case it is liberty profile with no admin center.

    Also I found this in the knowledge Center
    https://www.ibm.com/support/knowledgecenter/SS8JB4/com.ibm.casemgmt.design.doc/acmta010.html  (EAR file for custom widget package isn't deployed)

    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 4.  RE: Deploy app for custom widget in CP4Automation

    Posted Mon August 03, 2020 11:08 AM
    Pandian, with BAW onCtnrs you have two options to deploy an application. You know that you have a Workflow Center still running on WAS and a Workflow Server onCtnrs.  a) online Deployment, provided the Workflow Server is registered to the Workflow Center.  b) offline Deployment, i.e. you export the snapshot from the Workflow Center. Afterwards you use swagger to get authorized and to obtain a CSRF token to perform actions. Use the install action to deploy a new snapshot to your Workflow Server   Containers: POST std/bpm/containers/install. The former wsadmin commands are exposed via these REST APIs against the liberty server.  See https://www.ibm.com/support/knowledgecenter/SS8JB4_20.x/com.ibm.wbpm.ref.doc/baw-apidoc/bpm-swagger-ops-standard-published.json for more details.

    ------------------------------
    Werner Fuehrich
    BPM Tech Sales / SWAT
    IBM Germany Research and Development
    Boeblingen
    497031163077
    ------------------------------



  • 5.  RE: Deploy app for custom widget in CP4Automation

    Posted Mon August 03, 2020 01:37 PM
    Thanks for the response. I'm trying option B to install the custom widget file (a zip file containing ICMRegistry, EAR file and IIMPlugin.jar) from my laptop to the BAW server running on openshift cluster and I'm not sure how to provide the install_file * as formData. Do you have an example of the post ?

    Also is this the same action when we do "Import Custom Widget" from baw admin.



    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 6.  RE: Deploy app for custom widget in CP4Automation

    Posted Mon August 03, 2020 02:18 PM
      |   view attached
    Pandian, I pointed you to the install of a snapshot with a Case Solution or a Process App as described in attached document. Looking at your screenshot I'm not sure whether this is the right thing.  I'll involve another colleague.

    ------------------------------
    Werner Fuehrich
    BPM Tech Sales / SWAT
    IBM Germany Research and Development
    Boeblingen
    497031163077
    ------------------------------



  • 7.  RE: Deploy app for custom widget in CP4Automation

    Posted Mon August 03, 2020 02:53 PM
    Ok. Also My evaluation/demo BAW container copy does not have container APIs



    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 8.  RE: Deploy app for custom widget in CP4Automation

    Posted Tue August 04, 2020 08:23 AM
    Hi Pandian,

    For deploying custom widgets in BAW on Container topology, plz follow the instructions in the below infocenter link
    https://www.ibm.com/support/knowledgecenter/SS8JB4_20.x/com.ibm.wbpm.imuc.container.doc/topics/tsk_config_custom_widgets.html

    ------------------------------
    VISHNU K V
    ------------------------------



  • 9.  RE: Deploy app for custom widget in CP4Automation

    Posted Tue August 04, 2020 09:27 AM
    Hello Pandian,

    As Vishnu mention, please follow the KC link.
    Note that, recompilation of the WAR file is not required, however repackaging is required if Custom plugin depends on case client widget files.

    ------------------------------
    PaulPacholski
    Offering Manager | Digital Business Automation
    IBM Canada Ltd.
    ------------------------------



  • 10.  RE: Deploy app for custom widget in CP4Automation

    Posted Tue August 04, 2020 03:10 PM
    Thanks for the link. I'll try it and let you know the results.

    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 11.  RE: Deploy app for custom widget in CP4Automation

    Posted Tue August 04, 2020 04:50 PM
    I can locate the Plugin store in the NFS system but able to understand the CRD (common resource definition) file step in the above link. Do you have a sample CRD for a custom Widgets ?

    My NFS plugin store:


    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 12.  RE: Deploy app for custom widget in CP4Automation

    Posted Wed August 05, 2020 08:12 AM
    Hi Pandian,
     In CRD file you can update the names of Custom Widgets to "custom_package_names"  configuration parameter as of following sample CRD section

    ########################################################################
    ######## IBM Business Automation Workflow configuration ########
    ########################################################################
    baw_configuration:
    ...
    ...
    ## The configuration for case
    case:
    init_job_image:
    repository: <workflow-server-case-initialization>
    tag: <image-tag-name>
    pull_policy: <Always>
    domain_name: <"P8DOMAIN"">
    object_store_name_dos: <"DOS">
    object_store_name_tos: <"TOS">
    connection_point_name_tos: <"cpe_conn_tos">
    network_shared_directory_pvc: <"icn-pluginstore-ctnrs">
    custom_package_names: <"CustomeWidget1.zip,CustomWidget2.zip">

    --------------------------
    Rahul Priyadarshi
    --------------------------

    ------------------------------
    Rahul Priyadarshi
    ------------------------------



  • 13.  RE: Deploy app for custom widget in CP4Automation

    Posted Thu August 06, 2020 10:04 AM
      |   view attached

    I added the above config to my CRD "icp4adeploy" CRD (img1) and also moved the "IntelligentInvestigationWidgets.zip" to the plugin store (img2). Saved the CRD. Nothing happened. (I'm also attaching my CRD for your reference). I still see the missing JS error when I bring the case client.





    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------

    Attachment(s)



  • 14.  RE: Deploy app for custom widget in CP4Automation

    Posted Thu August 06, 2020 11:33 AM
    I checked your CR file which you have attached here, there is a typo for baw section "bae_configuration" it should be "baw_configuration" . Indentation for <domain_name: "P8DOMAIN" > is mismatching with other parameters.



    ------------------------------
    Rahul Priyadarshi
    ------------------------------



  • 15.  RE: Deploy app for custom widget in CP4Automation

    Posted Thu August 06, 2020 01:13 PM
    Thanks for catching the error. I made the change and applied the CR. Still I get the missing JS file error. I'm attaching the MyCustomWidgets.zip and the CR file for your reference.
    (img1) -> shows I applied the CR successfully

    (img2)-> show the error of the missing JS in the Case client.


    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------

    Attachment(s)



  • 16.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri August 07, 2020 12:08 AM
    Hi Pandian,
     Could you please provide us the logs of case-initialization pod.
    you can use following command to get the log.
    oc get pod | grep case​
    oc logs <case-initialization-pod-name>  > case-init.log


    ------------------------------
    Rahul Priyadarshi
    ------------------------------



  • 17.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri August 07, 2020 09:53 AM
    Yesterday, I tried one of the steps listed in the link above to install custom widgets "Delete the case Init job in OpenShift and the system will rerun the case Init job and redeploy your custom widget package" and after that I did not see the case init JOB getting re-created.
    Also I tried the following command and I did not see any pods.
    oc get pod | grep case​​


    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 18.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri August 07, 2020 09:52 AM
      |   view attached

    Hi Pandian,
    I spent some time to evaluate the custom widget that you have attached, found small issue in WEB-INF/web.xml file that restricts to deploy the widget ear file in Liberty. (Deploying the ear happens in Navigator POD)

    In web.xml the tag web-app requires version attribute which is not there in your custom widget. 

    I am able to deploy the Custom widget successfully after updating the version attribute for web-app tag in WEB-INF/web.xml like below

    <web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> 

    I have updated the changes and attached zip file here.

    Redeploy the custom widget

    -- Update the modified zip under custom_plugins_Navigator_persistent_volume
    -- Delete the IntelligentInvestigationWidgets.ok file from the following folder: "custom_plugins_Navigator_persistent_volume/properties".
    -- Delete the case Init job in OpenShift and the system will rerun the case Init job and redeploy your custom widget package



    ------------------------------
    Saisaran Yaratapalli
    ------------------------------

    Attachment(s)



  • 19.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri August 07, 2020 10:26 AM
    Saisaran, I downloaded and uploaded the new IntelligentInvestigationWidget.zip to the Plugin PVC and applied the CR file still no luck. I don't see IntelligentInvestigationWidgets.ok or Case init Job created.
    (Note: I delete case init job from the cluster assuming it will get recreated but it did not)

    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 20.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri August 07, 2020 10:34 AM
    list of CP4Automation PODs running under my project. Let me know if I'm missing anything for workflow.


    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 21.  RE: Deploy app for custom widget in CP4Automation

    Posted Fri August 07, 2020 11:36 AM
    Hi Pandian,
     As per operator configuration, if you change the CRD for a component the job will get recreated.  could you please delete the case-initialization job manually. After some time the job should be get created by operator. You could use following command to delete the job.

    oc get job | grep case
    oc delete job <case-init-job-name>


    ------------------------------
    Rahul Priyadarshi
    ------------------------------



  • 22.  RE: Deploy app for custom widget in CP4Automation

    Posted Sun August 09, 2020 05:08 PM
    I'm sending a screen shot of the CR applying process. Please check if I'm doing some thing wrong. After deleting the case job, it is not getting created after applying the CR.



    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 23.  RE: Deploy app for custom widget in CP4Automation

    Posted Mon August 10, 2020 12:12 AM
    I reinstalled CP4Automation demo version and  was able to create a case init job to load the custom widgets (EMWidgets.zip). I'm not sure if the the OK file should be populated or not. In my instance it is 0 bytes.
    Now I get a different error
    "https://navigator-cp4a-demo1.apps.federal.pub.ibm.gsc/navigator/plugin/ICMPlugin/getResource/ICMPlugin.js" Not found (404) HTTP error.




    ------------------------------
    Pandian Mariadoss
    IT Consulting Specialist
    IBM
    Coppell TX
    ------------------------------



  • 24.  RE: Deploy app for custom widget in CP4Automation

    Posted Mon August 10, 2020 01:54 AM
    Hi Pandian,
      This error you are getting due to plugin loading issue, could you please delete the config.ok file from properties folder of icn-pluginstore PV, and reinstalled CP4Automation demo version.

    ------------------------------
    Rahul Priyadarshi
    ------------------------------