199 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Kubernetes and IBM Bluemix: How to deploy, manage, and secure your container-based workloads
Wed, Aug 23rd 2017 19
Doh, IBM DB2 on the IBM Container Service on IBM Bluemix, remember persistence :-)
Tue, Aug 22nd 2017 31
IBM DB2 Express on IBM Containers - PAM says "No"
Tue, Aug 22nd 2017 38
Gosh and Darn it - Kubernetes, kubectl, macOS and IBM Bluemix
Mon, Aug 21st 2017 52
IBM Bluemix, Cloud Foundry and IBM Containers - fatal error: unexpected signal during runtime execution
Mon, Aug 21st 2017 32
Using Sed and Aw to munge JSON
Sun, Aug 20th 2017 53
Java to DB2 via TLS 1.2 - A new one on me
Fri, Aug 18th 2017 47
Top 10
What's the opposite of "cat" ? Another in the "I did not know that" series
Wed, Aug 16th 2017 125
Getting my head around REST APIs
Tue, Aug 15th 2017 79
IBM API Connect - Adding IBM DataPower Gateway into the mix - SOMA import failed
Thu, Aug 17th 2017 58
IBM API Connect - Now a Happy Bunny - Was Notworking, Now Networking
Fri, Aug 18th 2017 57
Using Sed and Aw to munge JSON
Sun, Aug 20th 2017 53
Gosh and Darn it - Kubernetes, kubectl, macOS and IBM Bluemix
Mon, Aug 21st 2017 52
IBM DataPower Playground - on IBM Bluemix
Fri, Aug 18th 2017 50
Java to DB2 via TLS 1.2 - A new one on me
Fri, Aug 18th 2017 47
Securing the Database - IBM DB2 10.5 and Transport Layer Security 1.2
Wed, Jun 3rd 2015 44
Transport Layer Security (TLS) 1.2 and SoapUI
Fri, Jun 12th 2015 41


IBM BPM - Tinkering with Process Instance Cleanup - aka BPMProcessInstancesPurge
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
   

Following my previous post: -


I've had a play with the BPMProcessInstancesPurge command.

It's WAY more powerful, and definitely a case of Caveat Emptor, Your Mileage May Vary and Here Be Dragons.

This command allows one to remove *ALL* instances from a Process Server, regardless of status.

But it does require one to Use The Force.

Now read on ….

Validate status of instances - active, completed, terminated, suspended

db2 "select inst.EXECUTION_STATUS, count(*) as total from LSW_BPD_INSTANCE inst, LSW_TASK task where task.BPD_INSTANCE_ID = inst.BPD_INSTANCE_ID group by inst.EXECUTION_STATUS"

EXECUTION_STATUS TOTAL      

              1.           1
              2.           1
              4.           1
              6.           1

Clear ALL Terminated instances

print AdminTask.BPMProcessInstancesPurge('[-instanceStatus TERMINATED]')

The BPMProcessInstancesPurge command passed.

Check results in AppCluster logs

tail -f /opt/ibm/WebSphereProfiles/AppSrv01/logs/AppClusterMember1/SystemOut.log

[04/01/17 17:04:25:612 GMT] 000001eb CommandServic I PALAdminCommands otherProcessInstancesPurge Entering
[04/01/17 17:04:25:616 GMT] 000001eb Log           I   PAL: About to delete the process instances matching the filter criteria: 
Statuses: [4]
Maximum duration: 0
Transaction slice: 10

[04/01/17 17:04:25:616 GMT] 000001eb Log           I   PAL: Number of qualifying instances before deletion: 1
[04/01/17 17:04:25:687 GMT] 000001eb Log           I   PAL: A deletion job is running. Progress: Deleted 1 instance(s).
[04/01/17 17:04:25:687 GMT] 000001eb Log           I   PAL: Every instance has been deleted. The deletion job finished.
[04/01/17 17:04:25:691 GMT] 000001eb Log           I   PAL: Successfully deleted the process instances matching the filter criteria: 
Statuses: [4]
Maximum duration: 0
Transaction slice: 10

[04/01/17 17:04:25:692 GMT] 000001eb Log           I   PAL: Number of qualifying instances before deletion: 1
[04/01/17 17:04:25:695 GMT] 000001eb Log           I   PAL: Number of qualifying instances after deletion: 0
[04/01/17 17:04:25:698 GMT] 000001eb CommandServic I PALAdminCommands otherProcessInstancesPurge Exiting
[04/01/17 17:04:34:110 GMT] 00000124 ProcessIndexB I   CWLLG0757I: The purge process was completed successfully. 1 tasks and 1 instances were successfully removed from the search index.

Validate that there are no longer any Terminated instances ( status code 4 )

db2 "select inst.EXECUTION_STATUS, count(*) as total from LSW_BPD_INSTANCE inst, LSW_TASK task where task.BPD_INSTANCE_ID = inst.BPD_INSTANCE_ID group by inst.EXECUTION_STATUS"

EXECUTION_STATUS TOTAL      

              1.           1
              2.           1
              6.           1

Attempt to clear ALL instances

print AdminTask.BPMProcessInstancesPurge('[-instanceStatus ALL]')

The BPMProcessInstancesPurge command passed.
wsadmin>print AdminTask.BPMProcessInstancesPurge('[-instanceStatus ALL]')
WASX7015E: Exception running command: "AdminTask.BPMProcessInstancesPurge('[-instanceStatus ALL]')"; exception information:
java.lang.Exception: java.lang.Exception: The instance status 'ALL' is a non end state. The '-force' flag is mandatory to delete instances in this state.

Attempt to clear ALL instances - use the force

print AdminTask.BPMProcessInstancesPurge('[-instanceStatus ALL -force]')

The BPMProcessInstancesPurge command passed.

Check results in AppCluster logs

tail -f /opt/ibm/WebSphereProfiles/AppSrv01/logs/AppClusterMember1/SystemOut.log

[04/01/17 17:08:42:748 GMT] 000001ec CommandServic I PALAdminCommands otherProcessInstancesPurge Entering
[04/01/17 17:08:42:753 GMT] 000001ec Log           I   PAL: About to delete the process instances matching the filter criteria: 
Statuses: [2, 4, 3, 1, 5, 6]
Maximum duration: 0
Transaction slice: 10

[04/01/17 17:08:42:754 GMT] 000001ec Log           I   PAL: Number of qualifying instances before deletion: 3
[04/01/17 17:08:42:963 GMT] 000001ec Log           I   PAL: A deletion job is running. Progress: Deleted 3 instance(s).
[04/01/17 17:08:42:963 GMT] 000001ec Log           I   PAL: Every instance has been deleted. The deletion job finished.
[04/01/17 17:08:42:970 GMT] 000001ec Log           I   PAL: Successfully deleted the process instances matching the filter criteria: 
Statuses: [2, 4, 3, 1, 5, 6]
Maximum duration: 0
Transaction slice: 10

[04/01/17 17:08:42:970 GMT] 000001ec Log           I   PAL: Number of qualifying instances before deletion: 3
[04/01/17 17:08:42:975 GMT] 000001ec Log           I   PAL: Number of qualifying instances after deletion: 0
[04/01/17 17:08:42:978 GMT] 000001ec CommandServic I PALAdminCommands otherProcessInstancesPurge Exiting
[04/01/17 17:08:49:143 GMT] 00000124 ProcessIndexB I   CWLLG0757I: The purge process was completed successfully. 3 tasks and 3 instances were successfully removed from the search index.

Validate the database

db2 "select inst.EXECUTION_STATUS, count(*) as total from LSW_BPD_INSTANCE inst, LSW_TASK task where task.BPD_INSTANCE_ID = inst.BPD_INSTANCE_ID group by inst.EXECUTION_STATUS"

EXECUTION_STATUS TOTAL      

  0 record(s) selected.

It goes without saying that the force should be used with caution - with great power, comes great responsibility ( just because you can, doesn't mean you should )


---------------------
http://portal2portal.blogspot.com/2017/01/ibm-bpm-tinkering-with-process-instance_4.html
Jan 04, 2017
7 hits



Recent Blog Posts
19
Kubernetes and IBM Bluemix: How to deploy, manage, and secure your container-based workloads
Wed, Aug 23rd 2017 9:15a   Dave Hay
A rather useful series of blog posts: -Kubernetes and IBM Bluemix: How to deploy, manage, and secure your container-based workloads - Part 1Kubernetes and IBM Bluemix: How to deploy, manage, and secure your container-based workloads - Part 2Kubernetes and IBM Bluemix: How to deploy, manage, and secure your container-based workloads - Part 3which dovetails with my personal interests right now, given that I've just successfully brought up: -(a) a containerised instance of IBM DB2 Express using Do
31
Doh, IBM DB2 on the IBM Container Service on IBM Bluemix, remember persistence :-)
Tue, Aug 22nd 2017 9:34a   Dave Hay
Having got DB2 running on the IBM Container Service on IBM Bluemix: -IBM DB2 Express on IBM Containers - PAM says "No"I was a little perturbed when my Java code failed to work, when connecting from my Mac to the DB2 container: -java -cp db2jcc4.jar:. JdbcTestDB2 54.23.128.93 50000 SAMPLE db2inst1 Qp455w0rd!com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-1031, SQLSTATE=58031, SQLERRMC=null, DRIVER=4.23.42I checked the SQL code: -db2 ? sql1031SQL1031N The database directory cannot be f
38
IBM DB2 Express on IBM Containers - PAM says "No"
Tue, Aug 22nd 2017 8:19a   Dave Hay
I'm still journeying the river of discovery with IBM Containers on IBM Bluemix, and was attempting to start / use a DB2 Express image: -docker run --name db2 -p 50000:50000 -e DB2INST1_PASSWORD=passw0rd -e LICENSE=accept -d registry.eu-gb.bluemix.net/david_hay/db2expressc db2startfb99173b-c082-4206-8f4f-ada478153bd3docker logs db2 -fgNew password: BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word%Changing password for user db2inst1.8passwd: all authenticat
52
Gosh and Darn it - Kubernetes, kubectl, macOS and IBM Bluemix
Mon, Aug 21st 2017 11:17a   Dave Hay
So I'm continuing my Voyage O' Discovery with IBM Containers, Bluemix, Kubernetes etc. on my Mac, following tutorials such as this: -Setting up the CLI and API to deploy and manage clusters in IBM Bluemix Container Serviceand have got to the part where one sets up kubectl using an environment variable $KUBECONFIG.Whilst I can "see" my Kubernetes cluster: -bx cs clustersOKName ID State Created Workers Datacenter DaveHayK
32
IBM Bluemix, Cloud Foundry and IBM Containers - fatal error: unexpected signal during runtime execution
Mon, Aug 21st 2017 9:24a   Dave Hay
Whilst tinkering with IBM Bluemix, using the underlying Cloud Foundry (CF) and IBM Containers (IC) capabilities, I was looking to update the IC plugin: -cf ic updateYou are using version 0.8.934 of the IBM Containers plug-in.Version 0.8.1028 of the plug-in is available for you to install.Run the "cf ic update" command to update your plug-in to the current version.You can review the documentation to see the changes that are included in the new version.https://www.ng.bluemix.net/docs/containers/
53
Using Sed and Aw to munge JSON
Sun, Aug 20th 2017 9:32a   Dave Hay
One of my friends had a requirement to pull apart from JSON data, stripping out specific "columns" of data, ideally using standard Unix/Linux commands, again ideally in one single command.This is with what I came up :-)So here's an example of the JSON data: -davehay.json{ "givenName": "Dave", "familyName": "Hay", "eddress": "david_hay@uk.ibm.com" "givenName": "Dave", "familyName": "Hay", "eddress": "david_hay@uk.ibm.com" "givenName": "Dave", "familyName": "Hay"
47
Java to DB2 via TLS 1.2 - A new one on me
Fri, Aug 18th 2017 7:05p   Dave Hay
So I've been helping a friend debug and resolve a problem whereby his Java 7 code wasn't connecting to a DB2 database via a TLS 1.2 connection.To validate this, I setup a DB2 instance to support TLS 1.2: -As rootecho "db2c_ssl 60007/tcp" >> /etc/servicesAs db2inst1/home/db2inst1/sqllib/gskit/bin/gsk8capicmd_64 -keydb -create -db /home/db2inst1/keystore.kdb -pw passw0rd -stash/home/db2inst1/sqllib/gskit/bin/gsk8capicmd_64 -cert -create -db /home/db2inst1/keystore.kdb -pw passw0rd -label
57
IBM API Connect - Now a Happy Bunny - Was Notworking, Now Networking
Fri, Aug 18th 2017 3:59p   Dave Hay
As per the past few posts, I've been learning my way around IBM API Connect, and had it nearly working - until about 15 minutes ago when it ALL started working. Without getting too deep into the What and How, the TL;DR; is this …..I have three VMs; the API Manager, the Developer Portal and the DataPower Gateway.As per a previous post: - IBM API Connect - Adding IBM DataPower Gateway into the mix - SOMA import failed I'd moved DataPower onto a different Mac, as it requires 8 GB RAM.I'd sen
38
IBM API Connect - "Unexpected token ILLEGAL"
Fri, Aug 18th 2017 2:35p   Dave Hay
So I'm continuing my voyage of discovery with IBM API Connect, and had followed this tutorial to create a simple API using Loopback: -Building a simple public API on API ConnectAnnoyingly, when I came to test my API, I was seeing this: -and, via Debug, this: -This is the Gateway Script that I have: -Can you see what I can see ?Yeah, I'm at home to Cap'n Copy Paste :-(I fixed my code: -saved the API and republished the product.Now we have this: -which is far far better.So, for the record, the
31
IBM API Connect - Webhooks not configured
Fri, Aug 18th 2017 2:27p   Dave Hay
I'm learning my way around IBM API Connect at present, which is giving me a great opportunity to also learn IBM DataPower Gateway, which is nice.Whilst trying to determine why I'm unable to test my APIs on the DataPower Gateway from within the API Manager, I was looking at some of the underlying Developer Portal commands, including: -list_siteswhich returned: -5995c388e4b0d25e2a2ee8f2.5995c388e4b0d25e2a2ee8fe => portal.uk.ibm.com/davehay/sb (INSTALLED) Webhooks not configuredand: -statusSy




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition