I'm a new in Bonita bpm. I receive data from my connector in the form as a json string.
There is like connector output param. I store this param like pool variable.
Then, i get this value with external api:
../API/bpm/activityVariable/{{taskId}}/response_rows[enter image description here][1]
I got json array like :
[{"reason":"reason","createdBy":"4","endDate":"2018-11-23T00:00:00+0000","persistenceId":"1","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-15T00:00:00+0000","createtionDate":"2018-11-21T05:56:02+0000"},{"reason":"reason","createdBy":"4","endDate":"2018-11-23T00:00:00+0000","persistenceId":"2","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-16T00:00:00+0000","createtionDate":"2018-11-21T06:01:26+0000"},{"reason":"test","createdBy":"4","endDate":"2018-11-16T00:00:00+0000","persistenceId":"3","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-16T00:00:00+0000","createtionDate":"2018-11-21T07:26:57+0000"},{"reason":"reason","createdBy":"4","endDate":"2018-11-23T00:00:00+0000","persistenceId":"33","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-22T00:00:00+0000","createtionDate":"2018-11-21T13:25:35+0000"},{"reason":"1111","createdBy":"4","endDate":"2018-11-17T00:00:00+0000","persistenceId":"34","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-17T00:00:00+0000","createtionDate":"2018-11-21T13:26:58+0000"},{"reason":"rrr","createdBy":"4","endDate":"2018-11-30T00:00:00+0000","persistenceId":"35","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-09T00:00:00+0000","createtionDate":"2018-11-21T13:29:37+0000"}]
I can create json variable from this json and set it as a data source.
I see that everything works fine. But when I set the data as External API variable nothing is displayed in the table.
I use the expression of my variable and not a constant (a small button in the content setting).
How can I show json array as a table ? Is it posiible ?
You can alternately save the API URL as a String Variable
return '../API/bpm/activityVariable/' + $data.taskId + '/response_rows[enter image description here][1]';
and use it as URL expression or variable.
I'm creating a Spring MVC application. I also have a dataTable in the MySQL database. Inside the database, there is a table, and inside the table consist of several columns. One of the columns has type data "LONGBLOB" (the name of the column is file_data)
The picture is the content of 1 "file_data".
1. How to convert the file_data which has longblob type to data URL?
There are some tutorials/discussions about this topic on the internet, but mostly using javascript. I have not got the idea how to convert it by using spring MVC.
Actually you can use javascript to the blob data. The idea is, try to show the data from your controller into your html/jsp file (frontend). And then, try to get the content, for example you put the data inside tag div with certain class or id.
After that, try to get it inside javascript, for example var blob = document.getElementById('<you id/class name>').innerHTML;
var data = new Blob([blob], {type: 'text/csv;charset=utf-8;'});
URLdata = window.URL.createObjectURL(data);
How can i get a url value without showing parameter string
sitename.com/example.swf?var1=[regionvar]
Swf used inside a virtual grid and above url string using var1=[regionvar]
does output the region instance number using this code
regionvar:String = loaderInfo.loaderURL;
text1.text = regionvar.toString()
the above returns
sitename.com/example.swf?var1=12345678
What i need is the value without including the parameter string in the url
sitename.com/example.swf
Being able to check the value of the region without parameter string in url
is needed to check if swf is being used only in the proper region.
regionvar is preexisting variable in grid
Thank you for the help
Something like:
var UV:URLVariables = new URLVariables(loaderInfo.loaderURL.split("?")[1]);
trace(UV['var1']);
P.S. Also try this, it just could work:
trace(loaderInfo.parameters['var1']);
I want to assign the header row of a .csv file as the dataprovider of a drop down list. So far I can load the .csv with a url request and loader. I assign the datatype as text and trace the output of the loader.data which shows me everything in the csv.
protected function appendFileUploadedHandler(event:AppendFileUploaded):void
{
userCSVRequest = new URLRequest("foo.com/myFile.csv");
userCSVLoader.dataFormat = URLLoaderDataFormat.TEXT;
userCSVLoader.addEventListener(Event.COMPLETE, csvLoader_complete);
userCSVLoader.load(userCSVRequest);
}
public function csvLoader_complete(event:Event):void{
trace(userCSVLoader.data.toString());
}
What I can't figure out is how to determine where the first row / header row ends. Should I just convert the csv to xml or is there something I can do that doesn't involve that extra step. Some of the csv files will be very large so I dont want to waste the loading time.
For anyone else that runs into this problem, the solution is pretty simple. Nothing I found through searching gave me exactly what I needed. I ended up using the .split method on userCSV.data (which is a string type) and assigning the value to an array.
//will truncate everything past the first new line char. hopefully this is your header.
var headerArray:Array = userCSV.split("\n",1);
I have created one as3 application to capture and save the mic or web cam in red5 server by streaming.
I am also changing the file name by passing argument in publish() function.
How I can check whether the any other file with same name already exists in the server or not.
I want to maintain the file name sequence in the server...
Example: if the file name "xyz.flv" I sent through publish() and the xyz.flv already there in the server, then it should take the sequence of the file name like "xyz-1.flv" or "xyz-2.flv"...like that.
why dont you use a timestamp for the naming?
do something like:
var date_str:String = (today_date.getDate()+"_"+(today_date.getMonth()+1)+"_"+today_date.getFullYear()+"_"+today_date.getTime());
newRecording = new Recording(); //create a record instance
newRecording.filename = "rec_" + date_str; //name the file according to timestamp