How to display BDM in table
I need to display the records that are in my BDM in UI Designer, so far I have only been able to display what is in my process variable, through the following code:
../API/bpm/caseVariable/{{task.caseId}}/listaTransportadoras
However I need to display my BDM records in a table in the UI Designer, how can I do this?
I tried to create an API like this:
../{{context.transportadoras_ref.link}}
And I called the attributes of my BDM like this:
retorno.status
But the return was empty, what do I need to change to return have the attribute value of my BDM?
Hi
Sorry I was Not able to Open the BOS file as I am using a Lower Version of Bonita.
I have the BOS file. I will test it out later.
For Now , I have Uploaded screenshot of My Pages where I use the context.ref to Pull Data and Display inside the Page.
Let Me know If you are able to access the Screenshots and iF it Helps you in any way.
Alternately I can open your BOS file once I download a Higher version of Bonita .
Here Is the Link
https://goo.gl/photos/qdCmhGr3SkzQZFgg6
If you want to Display the BDM records inside an Application page(Outside the Portal) .Then you will need a Separate API
/bonita/API/bdm/businessData/com.model.Table_name?q=find&p=0&c=10000
Comments
I looked your images, and apparently their settings are the same as the way I set it, I believe that when you can take a look at my .BOS file, you will understand why I am not understanding what is happening to not display the information of the attributes
Answering your question, I believe it is within a task that has this Form (I am new to Bonitasoft and do not know the correct nomenclature). Another thing I checked for an APi External variable as you suggested in the answer, I am sending the link of the image to you to see the result
https://drive.google.com/file/d/0B8aMiLwwVY0nbFBTSE5sUVRMQTA/view?usp=sh...
https://drive.google.com/file/d/0B8aMiLwwVY0nVDNhTk1nalFIeW8/view?usp=sh...
Reseted my BDM and add a new item that arrest had added:
https://drive.google.com/file/d/0B8aMiLwwVY0ncG10QWFES2t1V1k/view?usp=sh...
But I can not determine that he brings me the name of the carrier, for example
I added the variable, after that I need to change something else, because the result of the table was the same.
https://drive.google.com/file/d/0B8aMiLwwVY0nOEZHQnhCNGl5WEU/view?usp=sh...
Thanks for the feedback,
I tried to open the .BOS file that you edited, but it is in a version higher than mine (You sent it in 7.4.2 and I have version 7.3.3 installed)
Good morning, thanks for the feedback. I've made some progress in my work and I'm already able to display the BDM table information in the UI Designer, but I do not want to have repeated information inserted into my BDM, can you help me? I am sending the link to the updated .BOS file
Many thanks for the help.
Link:
https://drive.google.com/file/d/0B8aMiLwwVY0nVXhPemhsQzh0MDA/view?usp=sh...
I put the link to my .BOS file updated in my last comment, would you be able to take a look at how it is now? I created another question here in the forum that explains better how my process is at the moment
Link to the question:
http://community.bonitasoft.com/questions-and-answers/how-compare-two-bu...
I am a beginner in Bonitasoft, if you could analyze my new file would be great. If possible give a more detailed example of how to generate this page variable that you commented would be very good too
Thank you very much for your attention and patience so far.
Yes I saw the previous comment, but as I said I am new in BonitaSoft and I do not have much knowledge in javascript, so I even suggested that you should see this as my file so that you could edit what I think necessary
I made a script that checks if the information being selected in PostgreSQL is the same as that already in the BDM, but is the reference of the records of my BDM for me in my Log file is appearing and not the information that is what I really need Compare, could you help me with this script?
Log File:
2017-02-20 11:59:43.479 -0300 INFORMAÇÕES: org.bonitasoft Registros BDM: 4
2017-02-20 11:59:43.481 -0300 INFORMAÇÕES: org.bonitasoft Registros Banco de Dados PostgreSQL: 3
2017-02-20 11:59:43.487 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@1c2fa22
2017-02-20 11:59:43.487 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.487 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.487 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@1c2fa22
2017-02-20 11:59:43.487 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.492 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.492 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@1c2fa22
2017-02-20 11:59:43.492 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.492 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.492 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@1c2fa22
2017-02-20 11:59:43.492 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.492 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@1c2fa22
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@1c2fa22
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft IGUAIS
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.493 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.494 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft IGUAIS
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@5bd5369
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.495 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft DIFERENTES
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@d7e68ae8
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO BDM: com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft POSSICAO POSTGRESQL: com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft IGUAIS
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft com.hss.model.TransportadoraPostgreSQL@12d614f6
2017-02-20 11:59:43.496 -0300 INFORMAÇÕES: org.bonitasoft
Script Groovy:
`
import java.util.logging.Logger;
Logger logger= Logger.getLogger("org.bonitasoft");
def i = 0;
def x = 0;
def z = transportadorasBanco.size();
def y = listaTransportadoras.size();
logger.info("Registros BDM: "+ z)
logger.info("Registros Banco de Dados PostgreSQL: "+ y)
while (x <= (z - 1)){
while (i <= (y - 1)){
if (transportadorasBanco.get(x).toString().equals(listaTransportadoras.get(i).toString())){
logger.info("POSSICAO BDM: " +x)
logger.info("POSSICAO POSTGRESQL: " +i)
logger.info("IGUAIS")
logger.info(transportadorasBanco.get(x).toString())
logger.info(listaTransportadoras.get(i).toString())
logger.info("")
}
else {
logger.info("POSSICAO BDM: " +x)
logger.info("POSSICAO POSTGRESQL: " +i)
logger.info("DIFERENTES")
logger.info(transportadorasBanco.get(x).toString())
logger.info(listaTransportadoras.get(i).toString())
logger.info("")
}
i++;
}
x++;
i = 0;
}`
I know that comparing the references of these records will not advance me because whenever the process starts the references both the pull of PostgreSQL and what I just added in BDM will be the same, so I need to be able to compare the code of the carrier for example.
If you can help me with that, I thank you very much.
regards
Romualdo Santos
for all:
A Tip on displaying CODE/LOGS correctly in Posts:
Do not use the Supplied Buttons above, for some reason they refuse to work correctly, and despite bringing it to Bonitasofts attention, it's low priority.
To Show Code/Logs correctly use
< code >
your code/log
< /code >
removing the spaces to allow the showing of code/logs correctly as here:
Thanks and regards
Seán
Hi
Sorry I was Not able to Open the BOS file as I am using a Lower Version of Bonita.
I have the BOS file. I will test it out later.
For Now , I have Uploaded screenshot of My Pages where I use the context.ref to Pull Data and Display inside the Page.
Let Me know If you are able to access the Screenshots and iF it Helps you in any way.
Alternately I can open your BOS file once I download a Higher version of Bonita .
Have you read the Getting Started Tutorial? All the information you need is in there...
http://documentation.bonitasoft.com/?page=getting-started-tutorial
regards
Seán
PS: While you may not like the answer, it gives a possible solution, please mark as resolved.
Comments
I read the tutorial but did not understand how I can get the contents of my BDM attributes and display in a table in the UI Designer, could you give me an example of how I can do this? I will add the link to my .BOS file from my process, if you can see what I can do to accomplish this task I thank you very much
https://drive.google.com/file/d/0B8aMiLwwVY0nUFl1MUdQYkFaRkk/view?usp=sh...
Comments
Hi
You have the Correct Procedure. Maybe you got the naming incorrect .
Inside your Form, Add a text Field. Replace all the text with {{context}} .
Preview the Page. It should Pull up the correct Ref link.
this is How i check most of Issues .
Hope this helps .
Thanks for trying to help me, I did what you indicated but the Text field returned blank by placing {{context}},
So when putting in an input field it returned me this: "{{properties.placeholder | uiTranslate}}"
Just to confirm, it's literally {{context}} in a text field, or the name of my variable that's receiving my REST API
@romualdo.s.rs
the Text field returned blank by placing {{context}}
This is expected, because Context only references Business Data, not process variables. It's really annoying.
So if you are getting nothing are you sure you've added the BDM to the Data? If not then it will show nothing, if you have then is there any data in it?
Add a new External API variable to the page and give is
../API/bdm/businessData/com.company.model.Customer?q=find&p=0&c=100
where com.company.model.Customer is your BDM. You MUST have the q, c and p parameters.
Add a new table to the page
In Content click the button so it shows a white X on dark blue (expression or variable) and type the name of your variable above.
in COLUMN KEYS - you MUST specify the columns you want in the table to show. Note this must be left as fx
That's it should work now...
Note as follows:
{{properties.placeholder | uiTranslate}} comes back when it cannot parse the value and therefore cannot display anything.
It really is {{ context }} in the text field, though we actually put text is to describe it to help us know what it is...
for example.
regards
Seán