Skip to main content

Posts

Showing posts with the label ibm bpm

Simple timer implementation in IBM BPM service

In IBM BPM we can use the Timer events in the BPDs to introduce the waiting period but we don't have any direct implementation of the timer in the service flows (or the server-side scripts). In this post, I'll explain a simple way to use the existing Java class in the script to simulate the time delays in the server-side logic. Below image shows the implementation of it. In the above example, I have used the java.lang.Thread.sleep() method to add the desired delay. The best part of this implementation is we don't need to import any additional package or classes the time is accurate to the milliseconds and not random and different when we try to use the counter and for/while loop Below is the script for reference var waitTime = function(milliseconds) { log.info("Wait time for " milliseconds" + milliseconds start"); java.lang.Thread.sleep(milliseconds); log.info("wait time over"); } waitTime(2000); That's all i...

How to get URL of web file in IBM BPM

In IBM BPM, sometimes we need the URL of the web files added to the process app. Below is the script that can be used to get the actual URL of the web file dynamically helping to avoid the static hardcoding. com_ibm_bpm_coach.getManagedAssetUrl("file.png",com_ibm_bpm_coach.assetType_WEB Hope this will be helpful. Thank you for stopping by. Please leave comment and share if this helps you. Cheers!!

Change SPARK UI Table page size on Enter key

SPARK Table control is really a improved table compared to IBM BPM out of box Table control. But there are small annoying behaviors which might need a tweak to fix. One of such bug is no support of Enter key press on page SIzer control of Table to change the number of rows per table page. Out of box, you need to press Tab to reflect the change. To fix this you need to register the Enter key press event to do the stuff. Below is the script you need to add on Table On_Load event to make the Enter key press work.  me._instance._pageSizer.onkeypress = function (event){return (event.charCode >= 48 && event.charCode <= 57) || (event.keyCode == 8) || (event.keyCode == 9) || (event.keyCode == 13);};

How to use dojo.query to filter out few unwanted elements

Ever had scenario where you use a dojo.query to get the list of elements with some specific class but then realized you need to ignore few more elements from the result but cannot as those elements also have the same class defined. No problem you can modify your query string to add the not function and pass in the new unique class which only these controls have. Not able to find any unique class, no issues, you can manually assign one custom class and use it in the query. I encountered this requirement while working in IBM BPM Coaches but this is not specific to BPM instead it's a pattern for dojo query. So here is an example of filtering the controls using the class names in the dojo.query dojo.query(".CPP") gives me the list of all the interactive controls in the page. But I don't want the button controls and my button control has another class as "Button" to my modified query will be dojo.query(".CPP:not(.Button)") This query will list all the e...

How to pass parameter to function while calling it in spark controls

This is extension to the article of Creating Custom Functions in Spark UI Toolkit. It don't have option to explain how to define the function with real input parameter and invoke it with data. To understand how to Create Custom Function in Spark, please refer this  link. Here I'll explain how to define the function with real input parameter (not the control input) and how to invoke it with the data. It's the normal way of writing any parameterized function in custom HTML (Advanced control) in IBM BPM, like openLink(control, val) {//code here;}. Screenshot below. In this you can see I'm using val variable to get the input and deciding the link to open based on it's value. The suggested way to call the function in spark on any control event is like @openLink() as shown below.   But this will not pass any value. Interestingly as per the explanation in the Spack help, it pass the control reference in the function. and you can't try the combinations of passing the e...

Using Link Button control of SPARK UI Toolkit in BPM 8.5.7

One of the missing control from IBM BPM 8.5.7 Responsive Coaches components is the Link control. To achive this we need to create our custom control and use it or if you have Spark UI Toolkit, then you can use the Link control. The control has two use types: URL and Boundary Event. Link as URL: You can set the Link Type behavior to URL and provide the inline URL or bind the variable having valid URL. By default the URL link will open in new window. If you want to replace the existing window, you can check the option Open in Same Window. Link as Boundary Event: You can also use the Link control to inact as button and can define the navigation flow in the service. For this you need to set the Link Type as Boundary Event. No need to provide any URL as it'll anyway ignore it. Now you can draw the sequence line for the Link control and have your flow and code in place.  But interesting part to do here is check the Open in Same Window . If you don't enable this check box, in IE11 the...

Great links to learn IBM BPM User Interface in 8.5.7

Hello friends, As we all know IBM has started putting efforts to improve it's BPM coaches to make it more rich and responsive. It's a good time to learn the basics about the coach design and learning the basics about it. Below are few links which will help to understand the BPM coach designing. 5 Things to Know about Designing IBM BPM User Interfaces

Localised Calendar in BPM 857 using Spark Date Picker

I found a way to get the Swedish calendar and its easy one time effort Following is the steps to get any localised calendar. The steps is to achive the Swedish version of calendar. 1. Extend the ‘Resource Bundle Group’ called CONTROLS to add “svenska (Sverige,Euro)” localization. 2. Duplicate I18N Service (ajax service) to use modified CONTROLS. 3. Enable the I18N option in the Date Picker to use the locale. 4. Add 'Configuration' control in the coach and use the I18N service from step 2. Note: We can set our locale by Edit Profile in Process Portal.               Cheers, Saroj

BPM task failed at end event

I had the scenario, where the task (or activity) with Client-side human service (CSHS) in BPM 8.5.7 was failing. The CSHS was completing successfully on standalone run, but it was failing when used in the process, not letting the flow to move to next task. After spending some time I realized it may the issue of the private variables whose data type was (unavailable), as I copied the CSHS from another process app and copied only those data types which was used in coach UI. The moment I deleted those variables with unavailable datatypes, the process task also finished successfully :) Learning: 1. Find any variables with unavailable data type 2. either remove them if unused (in my case) or you need to define (or copy) the required data type. Cheers, Saroj