Showing posts with label BPM. Show all posts
Showing posts with label BPM. Show all posts

Monday, October 23, 2017

changing System Lane User / Multiple system Lane user

In IBM BPM system tasks are used for automated work.

These system tasks are executed by system user(mostly tw_admin or other admin user). These tasks are always executed by default system lane user.

If you want to change this default system lane user or add multiple system lane user and assign different users to different swim lanes, you can do it by following below steps.

Step 1 -
Create additional authentication aliases in WebSphere Administrative Console.

Go to Security -> Global Security -> Java Authentication and Authorization Service -> J2C authentication data
Create new users there.

image



image

Step 2- Once created, add these two authentication alias names to the list of SystemLaneUsers to indicate that these users can be used as system lane users using wsadmin scrpting.




deName = "De1"

de = AdminConfig.getid("/Cell:/BPMCellConfigExtension:/BPMDeploymentEnvironment:%s/" %deName)

print AdminConfig.showAttribute(de,"SystemLaneUserAuthAliasNames")

additionalSystemLaneUserAliases = ";".join( [ 'sys1', 'sys2' ] )

AdminConfig.modify(de, [ [ "SystemLaneUserAuthAliasNames", additionalSystemLaneUserAliases ] ] )


AdminConfig.save()


Now, you can use same in your Process App. if "system" Team is assigned to your swim lane, then first user will be used to process system tasks. 
If you want any particular user to execute system tasks then follow belos.

1.)
Create a team that contains the desired system lane user as its single user.
image


2.)
Add a new lane and mark it as a System Lane.
Associate it with desired Team name.

image




Source
https://www.ibm.com/developerworks/community/blogs/d350350e-2c84-4d33-a25d-73b42c7fbb5e/entry/Multiple_system_lanes_system_users?lang=en

https://www.ibm.com/support/knowledgecenter/SSFTN5_8.5.7/com.ibm.wbpm.admin.doc/topics/adding_system_lane_users.html

















Tuesday, March 14, 2017

IBM BPM instances are in completed state but tasks are Active

Due to a program error there might be a scenario when instance is in completed state but the task is in received state.

there are 3 Ifixes you have to install to get that solved. Below are links to technote for them

https://www-01.ibm.com/support/docview.wss?uid=swg1JR53167

https://www-01.ibm.com/support/docview.wss?uid=swg1JR52533

http://www-01.ibm.com/support/docview.wss?uid=swg1JR57381

Monday, June 9, 2014

EXECUTION_STATUS column in LSW_BPD_INSTNCE table

You need to query the database to get the status of your business process definition (BPD) instances. What is the meaning of the EXECUTION_STATUS field in the LSW_BPD_INSTANCE table?

Flag Meaning
1 The BPD instance is active.
2 The BPD instance has completed.
3 The BPD instance has failed. Look at the ERROR and ERROR_STACK_TRACE for further details.
4 The BPD instance has terminated.
5 The BPD instance did not start because its message event condition returned false.
6 The BPD instance is suspended,

Friday, April 4, 2014

UCA disappearing from Event Monitor or Corrupted UCA problem in IBM BPM - Solved

Problem Description - 
==============
Facing issues with Event Monitor related to UCA scheduling , its behaving weird the entries are randomly disappearing from the scheduler .

Even after re-enabling(checking unchecking from the application side) , the UCA appear in event Monitor for short time and disappear after one run or after some time.

Reason for Problem -
=============
When a time-based UCA is scheduled, an event manager task in the
LSW_EM_TASK table and two keywords in the LSW_EM_TASK_KEYWORDS 
table are created. These keywords are 'UCA4.<uca-id>' and 
'scheduledExec'. On rare occasions, you might see event manager 
tasks for time-based UCAs that have only the 'scheduledExec' 
keyword. When a UCA is rescheduled, the keywords are used to 
delete the previous event manager task.  However, having only 
the 'scheduledExec' keyword for a particular UCA could cause all 
other time-based UCAs to be deleted during the rescheduling 
process.
In our case we believed reason for this problem was due to our DB file system was running at 100% at couple of times.

Solution -
======
The proposed solution is to manually delete the corrupted task from the database. This must be done carefully in order to not corrupt the whole database. The following queries should be executed at times     
where they do not interfere with the scheduling time of the UCA, i.e. not at full hours, or 5,15,25,35,45 or 55 minutes after full hours or you UCA is about to get executed.

There are can be two type of problem as one of the keyword for perticular UCA is not present. I will explain both scenarios.

Scenario 1 -
------------
1.) Retrieve TASK_IDs for scheduled UCAs that have only the 'scheduledExec' keyword, but not the uca id keyword:

select task_id from lsw_em_task_keywords where keyword = 'scheduledExec' and task_id not in ( select task_id  from lsw_em_task_keywords where keyword like 'uca4%')


2.) Display description and ID of ucas returned by query2:  

select description,task_arguments_str from lsw_em_task where task_id in(select task_id from lsw_em_task_keywords where keyword = 'scheduledExec' and task_id not in ( select task_id  from lsw_em_task_keywords where keyword like 'uca4%'))

3.) If the result of query 2 shows only tasks with description "Execute UCA <UCA_Name> <Schedule>, on set schedule", then you can delete the corrupt UCA and keyword with the following queries:  

3.1) Delete corrupted lsw_em_task: 

delete from lsw_em_task where task_id in (select task_id from lsw_em_task_keywords where keyword = 'scheduledExec' and task_id not in (select task_id  from lsw_em_task_keywords where keyword like 'uca4%'))

3.2) Delete corrupted lsw_em_task_keyword:

delete from lsw_em_task_keywords where task_id in (select task_id from lsw_em_task_keywords where keyword = 'scheduledExec' and task_id not in (select task_id  from lsw_em_task_keywords where keyword like 'uca4%'))

Scenario 2 -
------------
1.) Retrieve TASK_IDs for scheduled UCAs that have only the  uca id keyword, but not the 'scheduledExec' keyword:

select task_id from lsw_em_task_keywords where keyword = 'uca4%' and task_id not in ( select task_id  from lsw_em_task_keywords where keyword like 'scheduledExec')


2.) Display description and ID of ucas returned by query2:

select description,task_arguments_str from lsw_em_task where task_id in (select task_id from lsw_em_task_keywords where keyword = 'uca4%' and task_id not in ( select task_id  from lsw_em_task_keywords where keyword like 'scheduledExec'))

3.) If the result of query 2 shows only tasks with description " Execute UCA <UCA Name>, on set schedule",then you can delete the corrupt UCA and keyword with the following queries:  

3.1)  Delete corrupted lsw_em_task:

delete from lsw_em_task where task_id in (select task_id from lsw_em_task_keywords where keyword = 'uca4%' and task_id not in (select task_id  from lsw_em_task_keywords where keyword like 'scheduledExec'))                                                       
                                                                        
3.2) Delete corrupted lsw_em_task_keyword:

delete from lsw_em_task_keywords where task_id in (select task_id from lsw_em_task_keywords where keyword = 'uca4%' and task_id not in (select task_id  from lsw_em_task_keywords where keyword like 'scheduledExec'))       

You could also only delete the corrupt task keyword with Query4. APAR JR47574 will then take care, that the associated UCA task is not executed and not rescheduled