Mostrando postagens com marcador BPM. Mostrar todas as postagens
Mostrando postagens com marcador BPM. Mostrar todas as postagens
sexta-feira, 19 de setembro de 2014
sexta-feira, 24 de janeiro de 2014
JOGET - POPULATE COMBO WITH USER
BEAN SHELL SCRIPT
Replace the variables with your parameters.
#envVariable.jdbcDefaultUrl#
#envVariable.jdbcDefaultUser#
#envVariable.jdbcDefaultPassword#
=============================================
// Lit all user
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
Connection con = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("#envVariable.jdbcDefaultUrl#", "#envVariable.jdbcDefaultUser#", "#envVariable.jdbcDefaultPassword#"); // declare datasource
if(!con.isClosed())
{
PreparedStatement stmt = con.prepareStatement("select id, CONCAT(CONCAT(firstName, ' '), lastName) from dir_user order by firstname asc"); // SQL query
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
FormRow r1 = new FormRow();
r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
f.add(r1);
}
}
return f;
}
return test();
Replace the variables with your parameters.
#envVariable.jdbcDefaultUrl#
#envVariable.jdbcDefaultUser#
#envVariable.jdbcDefaultPassword#
=============================================
// Lit all user
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
Connection con = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("#envVariable.jdbcDefaultUrl#", "#envVariable.jdbcDefaultUser#", "#envVariable.jdbcDefaultPassword#"); // declare datasource
if(!con.isClosed())
{
PreparedStatement stmt = con.prepareStatement("select id, CONCAT(CONCAT(firstName, ' '), lastName) from dir_user order by firstname asc"); // SQL query
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
FormRow r1 = new FormRow();
r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
f.add(r1);
}
}
return f;
}
return test();
Using HASH VARIABLE - JOGET - BEAN SHELL FORM BINDER
This programming code has the purpose of populate a selectbox.
// Lit all user
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
Connection con = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost:3307/jwdb?useUnicode=true&characterEncoding=UTF-8", "root", ""); // declare datasource
if(!con.isClosed())
{
String pId = "#currentUser.username#";
PreparedStatement stmt = con.prepareStatement("select id, CONCAT(CONCAT(firstName, ' '), lastName) from dir_user WHERE username=? order by firstname asc"); // SQL query
stmt.setString(1, pId);
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
FormRow r1 = new FormRow();
r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
f.add(r1);
}
}
return f;
}
return test();
// Lit all user
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
Connection con = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost:3307/jwdb?useUnicode=true&characterEncoding=UTF-8", "root", ""); // declare datasource
if(!con.isClosed())
{
String pId = "#currentUser.username#";
PreparedStatement stmt = con.prepareStatement("select id, CONCAT(CONCAT(firstName, ' '), lastName) from dir_user WHERE username=? order by firstname asc"); // SQL query
stmt.setString(1, pId);
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
FormRow r1 = new FormRow();
r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
f.add(r1);
}
}
return f;
}
return test();
quinta-feira, 23 de janeiro de 2014
JOGET Bean Shell Form Binder
An example of how to populate a combo using Bean Shell Form Binder.
Pay attention to the driver
com.microsoft.sqlserver.jdbc.SQLServerDriver
I'm connecting to a Microsoft SQLServer.
// Listar todas as demandas
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
Connection con = null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
con = DriverManager.getConnection("jdbc:sqlserver://148.6.7.999:1433;databaseName=dbChapolim;user=usr_kiko;password=usr_kiko;"); // declare datasource
if(!con.isClosed())
{
PreparedStatement stmt = con.prepareStatement("select NomeSistema ID, NomeSistema from TB_SISTEMA order by NomeSistema ASC"); // SQL query
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
FormRow r1 = new FormRow();
r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
f.add(r1);
}
}
return f;
}
return test();
Pay attention to the driver
com.microsoft.sqlserver.jdbc.SQLServerDriver
I'm connecting to a Microsoft SQLServer.
// Listar todas as demandas
import java.sql.*;
import java.util.*;
import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
Connection con = null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
con = DriverManager.getConnection("jdbc:sqlserver://148.6.7.999:1433;databaseName=dbChapolim;user=usr_kiko;password=usr_kiko;"); // declare datasource
if(!con.isClosed())
{
PreparedStatement stmt = con.prepareStatement("select NomeSistema ID, NomeSistema from TB_SISTEMA order by NomeSistema ASC"); // SQL query
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
FormRow r1 = new FormRow();
r1.put(FormUtil.PROPERTY_VALUE, rs.getString(1));
r1.put(FormUtil.PROPERTY_LABEL, rs.getString(2));
f.add(r1);
}
}
return f;
}
return test();
segunda-feira, 13 de janeiro de 2014
JOGET - After trying thousands of bpm applications.
After trying thousands of BPM applications I found JOGET.
I'm very excited with JOGET. Why?
After trying BonitaSOFT, Process Maker and Lombardi BPM, I found JOGET that has, in the community edition, enough features for you to make a complex workflow.
Amazing!!!!
The community version of Bonita and PM are not very, how can I say, enough. Even for study.
I'm just at the beginning of my evaluation, but my first impression of the product was excellent.
Há!
Here you have more details about it.
Joget Workflow
Unlike typical workflow engines, Joget Workflow allows IT professionals to turn their processes into a full-fledge workflow web application. With v3′s user friendly drag-and-drop user interface, developers are able to quickly design and prototype complex processes, easily create and map dynamic forms to process activities, combine forms and data listing into CRUD (create-read-update-delete) seamlessly; and assemble web UI components to create the final application front-end.
terça-feira, 17 de dezembro de 2013
BPM Lombardi - How to set option button
Hi!
On the Coach, your gonna select the Custom HTML Control.
After you place the control on the Coach, follow the example bellow.
<script>
$(document).ready(function() {
document.getElementById('RadioButtons0_2').checked = true;
document.getElementById('RadioButtons1_2').checked = true;
document.getElementById('RadioButtons2_2').checked = true;
document.getElementById('RadioButtons3_2').checked = true;
});
</script>
On the Coach, your gonna select the Custom HTML Control.
After you place the control on the Coach, follow the example bellow.
<script>
$(document).ready(function() {
document.getElementById('RadioButtons0_2').checked = true;
document.getElementById('RadioButtons1_2').checked = true;
document.getElementById('RadioButtons2_2').checked = true;
document.getElementById('RadioButtons3_2').checked = true;
});
</script>
BPM Lombardi - Current date
Hi!
I was looking for the function that would return to me the current date.
It took me two days, until my friend told me that there's no such function.
All you have to do is:
tw.local.yourdatevariable = new TWDate();
After you instantiate your variable, it automatically holds the current date.
It's really not intuitive!
segunda-feira, 9 de dezembro de 2013
BPM Lombardi - How to use variables on properties
Hi!
I was asking myself how to use the variables on the parameter value of document attachment control.
In fact, it's very simple.
Pay attention to the tags <#= and #>. There are no quotes or double quotes. Just write the variable between the tags.
And that's it.
I was asking myself how to use the variables on the parameter value of document attachment control.
In fact, it's very simple.
Pay attention to the tags <#= and #>. There are no quotes or double quotes. Just write the variable between the tags.
And that's it.
sexta-feira, 6 de dezembro de 2013
BPM Lombardi - Bind dropdownlist with a result from database
Hi!
After a lot of effort, I found out how to bind a drop downlist with the result form a stored procedure.
1 - My store procedure has result of 2 fields
exec BPM_ListarSistema
nomesistema
valor
2 - Declare a private variable with complextype
As you see on the picture bellow , I created the variable lsistema. The type of this private variable is vartypesistema, wich has two parameters: nomesistema and valor. Those two parameters have the same name of the columns that will be sent by the execution of the stored procedure BPM_ListarSistema.
The parameters and the columns from the database must match. Otherwise you'll no be able to do the binding.
lsqlsistema is the variable in wich I'll set the declaration "EXEC BPM_ListarSistema".
After a lot of effort, I found out how to bind a drop downlist with the result form a stored procedure.
1 - My store procedure has result of 2 fields
exec BPM_ListarSistema
nomesistema
valor
2 - Declare a private variable with complextype
As you see on the picture bellow , I created the variable lsistema. The type of this private variable is vartypesistema, wich has two parameters: nomesistema and valor. Those two parameters have the same name of the columns that will be sent by the execution of the stored procedure BPM_ListarSistema.
The parameters and the columns from the database must match. Otherwise you'll no be able to do the binding.
lsqlsistema is the variable in wich I'll set the declaration "EXEC BPM_ListarSistema".
3 - Server Script and Nested Service
First of all, you're gonna initialize the variable lsqlsistema.
After that, you're gonna execute the stored procedure. Fort that I used a nested service. The implementation is SQL Call Stored Procedure with return ANY
4 - Coach
Now, that you already executed the stored procedure and sotored the result in the lsistema variable with complex type vartypesistema, let's do the binding.
Dynamic Binding: tw.local.lsistema[]
Dynamic Binding value: .valor
Dynamic Binding name: .nomesistema
5 - And you are done!
quinta-feira, 28 de novembro de 2013
Bonitasoft x Processmaker
Hi!!
I have recently tested both products (opensource version) Bonitasoft and Processmaker.
In my opinion, Processmaker is easier to learn and is more intuitive. Besides, the opensource version of Processmaker has many more features than Bonitasoft.
So, that's my decision.
If had to decide between the two opensource versions, I would stick with Processmaker.
Há!
I have recently tested both products (opensource version) Bonitasoft and Processmaker.
In my opinion, Processmaker is easier to learn and is more intuitive. Besides, the opensource version of Processmaker has many more features than Bonitasoft.
So, that's my decision.
If had to decide between the two opensource versions, I would stick with Processmaker.
Há!
sexta-feira, 22 de novembro de 2013
ProcessMaker - final considerations
Hi!
I have just performed a full proof of concept on ProcessMaker BPM application, and I found something really difficult to overcome.
No matter where you are in the application, the columns you can visualize are
#, Summary, Case Notes, Case, Process, Task, Current User, Last Modify, Status
Well, let's think that in your process there are informations like subject, areas, products and so on.
If you try to use the search functionality, you're gonna find out that this very search doesn't include the dynaform fields. Why? My guess is that those fields are stored at XML structure and for this reason it becomes impossible to search on them.
Imagine you have a lot of inbox messages but you can't search on the content and you can't see the subject. You'll have to open all your messages, one by one, to find out what you are looking for.
But isn't possible to add columns that transform the view in a more intuitive experience? Yes, there is. But they are only available at the paid version, U$ 9.900,00 .
In my opinion, the opensource version of ProcessMaker has this huge problem, the search.
Conclusion:
In my scenario, I should say NO to opensource version of ProcessMaker
I have just performed a full proof of concept on ProcessMaker BPM application, and I found something really difficult to overcome.
No matter where you are in the application, the columns you can visualize are
#, Summary, Case Notes, Case, Process, Task, Current User, Last Modify, Status
Well, let's think that in your process there are informations like subject, areas, products and so on.
If you try to use the search functionality, you're gonna find out that this very search doesn't include the dynaform fields. Why? My guess is that those fields are stored at XML structure and for this reason it becomes impossible to search on them.
Imagine you have a lot of inbox messages but you can't search on the content and you can't see the subject. You'll have to open all your messages, one by one, to find out what you are looking for.
But isn't possible to add columns that transform the view in a more intuitive experience? Yes, there is. But they are only available at the paid version, U$ 9.900,00 .
In my opinion, the opensource version of ProcessMaker has this huge problem, the search.
Conclusion:
In my scenario, I should say NO to opensource version of ProcessMaker
Now I'm gonna try the Bonitasoft.
terça-feira, 19 de novembro de 2013
ProcessMaker - Example of trigger
Hey!
My brand new addiciton is the BPM tool, ProcessMaker.
What does this trigger do?
processId = 790924072528a08df8f5a61099702072
userId = 468963623527b95ba2d4f36042887697
Well, my idea was that in the end of a process a new case, of another process would be started for a specific user.
The user will receive in his inbox a case already started with status "to_do". It would be as if he had received an e-mail.
Very simple and very usefull trigger.
$taskId = '472503662528a09680c7973093755803'; //lookup the starting task's unique ID
$newCaseId = PMFNewCase('790924072528a08df8f5a61099702072', '468963623527b95ba2d4f36042887697', $taskId, array());
//if a new case was created, change its status in the database
if ($newCaseId) {
executeQuery("UPDATE APPLICATION SET APP_STATUS='TO_DO' WHERE APP_UID='$newCaseId'");
}
else {
$msg = "Unable to create new case." . isset(@@__ERROR__) ? @@__ERROR__ : '';
G::SendMessageText($msg, 'ERROR');
}
My brand new addiciton is the BPM tool, ProcessMaker.
The definition of the function I'm gonna use:
PMFNewCase()
PMFNewCase() creates a new case starting in the specified task.
variant PMFNewCase(string processId, string userId, string taskId, array variables)
What does this trigger do?
processId = 790924072528a08df8f5a61099702072
userId = 468963623527b95ba2d4f36042887697
Well, my idea was that in the end of a process a new case, of another process would be started for a specific user.
The user will receive in his inbox a case already started with status "to_do". It would be as if he had received an e-mail.
Very simple and very usefull trigger.
$taskId = '472503662528a09680c7973093755803'; //lookup the starting task's unique ID
$newCaseId = PMFNewCase('790924072528a08df8f5a61099702072', '468963623527b95ba2d4f36042887697', $taskId, array());
//if a new case was created, change its status in the database
if ($newCaseId) {
executeQuery("UPDATE APPLICATION SET APP_STATUS='TO_DO' WHERE APP_UID='$newCaseId'");
}
else {
$msg = "Unable to create new case." . isset(@@__ERROR__) ? @@__ERROR__ : '';
G::SendMessageText($msg, 'ERROR');
}
Assinar:
Postagens (Atom)

