IBM Business Process Manager


Can we use Javascript / DOJO Script to go to the Next Coach on Clicking a Button


Hi All,
Can we use Javascript / DOJO Script to go to the Next Coach on Clicking a Button instead of using the Normal BPM Button Click Functionality.
I am using BPM Tabs, when i click Next button the control goes to the Next Tab and the logic is working fine for me and now I have a requirement that after all the tabs are finished the control should go to the Next Coach in the Human Service.The same should be followed for Previous button also,after all the previous tabs are finished the control should go to the Previous Coach in the Human Service.
I mean the functionality to transfer the control from one tab to the other should work and the same Next / Previous Buttons should be used to go to Next / Previous Coaches. Please give some idea on this.
Thanks.
Hi All,
Is this scenario possible, if yes please give me some idea on how to proceed on this.
Thanks.
Raj4All
270003QSH0
‏2013-05-02T13:04:12Z
Hi All,
Is this scenario possible, if yes please give me some idea on how to proceed on this.
Thanks.
More...
Hi All,
Does any one have an idea on this, if yes, please share.
Thanks.
Raj4All
270003QSH0
‏2013-05-06T06:44:36Z
Hi All,
Does any one have an idea on this, if yes, please share.
Thanks.
More...
What version of the BPM product are you using?
Neil
I've provided a JS example below. I'm sure it is possible using Dojo, although I do not have an example on hand.
First create a button and give it a meaningful ID by setting the Control ID and Button ID on the button's properties. If you'd like, you can hide this button so it is not visible to the user to click.
Using JS you can create a function that calls the click method of the button object, and drop it on your coach in an HTML block.
<script type="text/javascript">
function clickbutton(){
document.getElementById('Your_Button_ID').click();
}
</script>
You can call this function after your tab requirements are met.
Navigation between Coaches is implemented on the Server Side, within the Human Service, by processing a Boundary Event from a Coach View on your Coach. If this is a requirement you have often, you might consider creating a reusable Coach View of your own to give you the desired behaviour.
If you examine the source code for the stock Button Coach View on the Behavior Tab View handler, you'll see this code to fire a boundary event when the button is clicked:
button.onclick = function() {
if (this.disabled == false) {
var context = _this.context;
if (context.options.allowMultipleClicks == undefined || !context.options.allowMultipleClicks.get("value")) {
this.disabled = true;
domClass.add(this, "BPMButton-disabled");
}
if (context.binding) {
context.binding.set("value", true);
}
var _button = this;
context.trigger(function() {_button.disabled = false; domClass.remove(_button, "BPMButton-disabled");});
}
The context.trigger() call is what's used to fire the boundary event. Check out the sample exchange for more details.
JohnT.Reynolds
27000319CQ
‏2013-05-07T12:49:59Z
Navigation between Coaches is implemented on the Server Side, within the Human Service, by processing a Boundary Event from a Coach View on your Coach. If this is a requirement you have often, you might consider creating a reusable Coach View of your own to give you the desired behaviour.
If you examine the source code for the stock Button Coach View on the Behavior Tab View handler, you'll see this code to fire a boundary event when the button is clicked:
<pre dir="ltr"> button.onclick = function() {
if (this.disabled == false) {
var context = _this.context;
if (context.options.allowMultipleClicks == undefined || !context.options.allowMultipleClicks.get("value")) {
this.disabled = true;
domClass.add(this, "BPMButton-disabled");
}
if (context.binding) {
context.binding.set("value", true);
}
var _button = this;
context.trigger(function() {_button.disabled = false; domClass.remove(_button, "BPMButton-disabled");});
}
</pre>
The context.trigger() call is what's used to fire the boundary event. Check out the sample exchange for more details.
More...
Hi,
The Next Button for the Tabs have to be used to go to next Coach when all the Tabs are finished and same with Previous button.I mean the same button should be used to go to next tabs and to the next Coach / Process.If it is possible please let me know the process.
I have the Tabs Scenario working but when i have the last Tab then on click of Next Button the control should go to Next Coach / Process.
Thanks.
Raj4All
270003QSH0
‏2013-05-15T09:00:55Z
Hi,
The Next Button for the Tabs have to be used to go to next Coach when all the Tabs are finished and same with Previous button.I mean the same button should be used to go to next tabs and to the next Coach / Process.If it is possible please let me know the process.
I have the Tabs Scenario working but when i have the last Tab then on click of Next Button the control should go to Next Coach / Process.
Thanks.
More...
Can any one share inputs or a working example for the above requirement.
Thanks.
nroubal
270005MJAA
‏2013-05-06T20:10:57Z
I've provided a JS example below. I'm sure it is possible using Dojo, although I do not have an example on hand.
First create a button and give it a meaningful ID by setting the Control ID and Button ID on the button's properties. If you'd like, you can hide this button so it is not visible to the user to click.
Using JS you can create a function that calls the click method of the button object, and drop it on your coach in an HTML block.
<script type="text/javascript">
function clickbutton(){
document.getElementById('Your_Button_ID').click();
}
</script>
You can call this function after your tab requirements are met.
More...
Hi I'm trying to do this in 8.0.1but it's not working.
I've set the control id but what is the button id?
Thanks
Jason
jayCaterham
27000611T9
‏2013-06-11T16:22:50Z
Hi I'm trying to do this in 8.0.1but it's not working.
I've set the control id but what is the button id?
Thanks
Jason
More...
Looking at the code above, I think this is an example of how to do this in Coach Designer based coaches, not in coach views.
AndrewPaier
2700040K2Q
‏2013-06-11T22:11:37Z
Looking at the code above, I think this is an example of how to do this in Coach Designer based coaches, not in coach views.
More...
Thanks Andrew.
Any ideas on how to click a BPMv8 NG coach button?
What I have is a number of HREF's on my coach. I can call a function from the href easily but trying to click a button so the coach flows to another coach (which is what I want to achieve) seems hard. Coming from the TW6 world this is something we did all the time without any issues.
Here's my code, the alert is showing the button details ok. (my button control id is reqDetails)
tw.local.reqReportTable+='<td>test</td>';
function selectSearch(){
alert(document.getElementById('reqDetails').innerHTML);
//document.getElementById('reqDetails').click();
}
Thanks Jason

Related Links

CWLLG0371W: There is no script content.
Building a Mobile App in IBM BPM 8.5
IBM BPM on SQL Server 2008r2 on Windows 2008r2
US Phone CV with Validation
No vertical scroll even if my coach height exceeds screen
deployed processes can\'t be invoked after system detects inacitivy for a certain amount period
IBM BPM 8.0.1 and Admin console Cache
How to Call REST Api through Process Designer?
this.context is null BPM 8.0.1.1
KPI information
add holiday schedule
Cannot Create User From ProcessAdmin Console in IBM BPM 8.5
Text area border color change to pink
Use dojo 1.9.2 with BPM 8.5.0.1
Duplicate check
Retrieve all teams in a Process

Categories

DW
Tivoli Business Servic...
dW China
Vietnam
test
PowerVM Blogs
IBM Connections Social...
IBM FileNet Records Ma...
IBM Mobile ECM
IBM Kenexa Participate
Application Security
Tivoli Security Compli...
Netcool/Impact General...
NetInsight OnDemand
CustomerInsight
Detect
Software Asset Management
Patch Management
WebSphere Cast Iron Ex...
IBM SPSS Data Collection
IBM SPSS Statistics Ge...
R Programmability in S...
Industry
Cognos BI 10
Сообщить о некорректно...
Rational DOORS adminis...
Rational RequisitePro ...
Enterprise Change Mana...
Service Virtualization
xml
grid
Java
rational
IBM Web Server Plug-in...
InfoSphere QualityStage
IBM InfoSphere BigInsi...
InfoSphere Information...
WebSphere Application ...
IBM Support Assistant ...
WebSphere Virtual Ente...
AppScan Source
X-Force
QRadar Extensions
Troubleshooting
Gentran Server for Unix
Gentran Server for Win...
Connect:Direct (Educat...
OM Mobile Framework
Gentran Mapping
**NEW** Sterling File ...
General Discussion
Connect:Direct
Multi-Channel Fullfill...
Selling System Release...
C3 Product Depot
SDK Tools & Utilities
How To's
Gentran Integration Su...
Store Order Management
Interoperability
Console Framework (HTM...
DB2
IBM ILOG Elixir General
Moderator Collaboration
BRMS Trial Support
Business Rules Best Pr...
Treemap
C++ Visualization Prod...
Rule Execution Server
Higher Education
1С:Предприятие на DB2
IBM Simulation Producer
Replication Monitoring...
Tivoli Workload Automa...
System Automation for ...
OMEGAMON Performance M...
SmartCloud Analytics -...
Tivoli Common Reportin...
IBM i
Using developerWorks
Performance Tools Forum
IBM BladeCenter Forum
System i Hardware Mana...
Lotus Web Content Mana...
General Parallel File ...
Exploring Semantic Web...
IBM Java Runtimes and ...
ibmpub.java.os390
Improve Your Java Code...
Linux for Power Archit...
IBM PowerVM Lx86 for x...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile