How to fetch value of Dataslots in custom Jsp in Savvion BPM? - business-process-management

I am using Progress Savvion BPM Studio 8.0.
I want to use value of "Dataslot" (variable) in custom jsp page with Scriptlet.
I am getting value of some "Dataslot" from previous activity and now I want to perform some action on that "Dataslot" and display it in table. But I don't know how to get/use value of "Dataslot" inside scriptlet.
I should use request.getParameter() or jst.getDataSlotValue().
I tried both of them but I am not getting any error or output.

You need to get it from bean.getProp(String,Object,Boolean) based on the type of the dataslot in the JSP. You also need to add the dataslot as input to the BizSolo or Custom JSP you have added in the bizlogic process.
Also you need to define bean with com.savvion.BizSolo.beans.Bean and with scope as Session.

Related

How to filter Microsoft Graph API JSON response using Power Query language?

My request is
GET https://graph.microsoft.com/v1.0/applications?$select=appRoles
Because of this I have a problem in PowerApps, I can't show the objects.
Assuming you have...
... a working Custom Connector named myCustConn
... with a GET method called GetRoles
try this:
In the PowerApp, insert a Button control and set its OnSelect property to:
ClearCollect(colAppRoles, myCustConn.GetRoles().value.AppRoles)
Then insert a Gallery control and set its Items property to:
colAppRoles
Then insert a TextBox control into the Gallery template and set its Default property to:
ThisItem.description (or ThisItem.id, etc.)

How do you get the value of a data attribute within an event-based rule in Adobe Dynamic Tag Manager (DTM)?

I have an event-based rule configured to fire on click of an element with a specific class. On click, I would like to capture the value of a data attribute that exists. The DTM documentation says you can capture attribute values using this syntax:
%this.data-event%
or
%this.id%
Example HTML:
On click of links with the class "test", I would like to store the value of "event name" within an eVar. When I used the above syntax however, the syntax is converted to a string and in the Adobe server call as:
v25:%this.data-event%
What is the best way to dynamically grab the value of an attribute of an HTML element on click within DTM?
DTM documentation says you can do that, but in practice I too have found that it doesn't seem to work as advertised most of the time, and will instead populate it with a literal (un-eval'd) string like that.
So what I do instead is under Conditions > Rule Conditions I create a Custom condition. In the Custom condition, I add the following:
// example to get id
_satellite.setVar('this_id',this.id);
// example to get href
_satellite.setVar('this_href',this.href);
return true;
Basically I create on-the-fly data elements using javascript, and then return true (so the condition doesn't affect the rule from triggering).
Then I use %this_id%, %this_href%, etc. syntax from the data element I created, in the Adobe Analytics section variable fields.
The easist way to capture the values of a data attribute against an eVar or prop on the element clicked using DTM is to set the input as the following:
%this.getAttribute(data-attributename)%
For example, if there was a data attribute on an element of data-social-share-destination='facebook' simply input %this.getAttribute(data-social-share-destination)%. This will then capture the value of 'facebook'
More detail on data attributes can be found at http://www.digitalbalance.com.au/our-blog/event-based-tracking-using-html5-custom-data-attributes/
I found a solution. The best way to grab the value of an attribute on click is to use this syntax:
%this.getAttribute(data-title)%
The key is to not use quotes around the attribute name AND ensure the attribute has a value.
If the attribute is missing, the expression is not replaced by an empty string as one would normally expect from experience in other platforms, but instead will display the raw un-interpolated code.

smart gwt save list as attribute

Hello i am new in smart gwt and now we are migrate from smartgwt 2.1 to smart gwt 3.1p
and i have got problem :
java.lang.UnsupportedOperationException: Can not convert element 0 of
the array to a JavaScriptObject. Instances of class
`com.test.ListDTO'
can not automatically be converted. Please see the SmartClient
documentation of RPCRequest.data for a table of Java types that can be
converted automatically.
someone write :
treeNode.setAttribute(TODO, listDTO.getLis());
how i can fix that code ?
The setAttribute method of the TreeNode tries to convert the list elements internally. That fails with your own domain objects. You can try to set the list with this helper method:
com.smartgwt.client.util.JSOHelper.setObjectAttribute(treeNode.getJsObj(), TODO, listDTO.getLis());
Now the Java object is set on the JavaScriptObject. To get this object back you can call:
treeNode.getAttributeAsObject(TODO);

Not able to set WorkItem State using TFS API?

I am trying to set State property value of Test Case Work item. I am creating using TFS API and C# code.
It throws an error while I save the test case using Save() method. I have called the Validate() method of a work item and the ArrayList shows the value I am trying to assign is an invalid state.
testCase.State = TestPointState.Ready.ToString();
ArrayList result = testCase.WorkItem.Validate();
if (!testCase.WorkItem.IsValid())
{
//this block executes
}
When I manually opened the MTM to see what are the different STATE values for existing work items, then I found READY and DESIGN. That's why I tried t assign TestPointState.Ready enum. I tried assiging READY string directly in that statement, but still the same exception whlie saving the test case.
Any idea on how to fix this issue ?
It is possible that when setting the state another field has then an invalid input. e.g.: when you change from Ready to Design it might require that you select who the AssignTo person is and so you'll need to populate these fields as well. You can use the Validate method to get a list of invalid fields after you set the state like below.
ArrayList invalidFields = newWI.Validate();

jQuery UI Autocomplete question on label and value

In the label we have item.ID + '-'+ item.Description
the value is item which is the object returned from the service.
When a selection is made 001-MyChoice for ex. from the autocomplete, the value which is the datacontract object is bound to the autocomplete field as [Object object]. How can I get 001-MyChoice to be bound for the selection ???
Pls help..
It's difficult to tell when you haven't posted any code to review. What format is your data returned from the service? JSON, XML?
I'm sure you're already looked at this link, but here it is just in case:
http://jqueryui.com/demos/autocomplete/#remote
Post some sample code of your js and some sample data of what your service returns for a better answer.
The autocomplete tags returned from your web service need to contain the tag 'term' and I think "ID", then the default call can help pull them out. Although not a perfect example if you look at the Jasonp example in the jQueryUI docs, that may help.
This is from memory but something like
{"term":"dog", "ID": "123"}, {"term":"cat","ID": "2"}
So you have 001-MyChoice as the label and you want it bound as the value?
Then don't specify the object returned as the value. Label and value are not required by the autocomplete. You can specify both if you want one in the dropdown select (label) and the other (value) used as the value of the select.
If you want the select item and the value to be the same, then put the same item in either the label or the value property.
From the jquery autocomplete docs:
The label property is displayed in the suggestion menu. The value will be inserted into the input element after the user selected something from the menu. If just one property is specified, it will be used for both, eg. if you provide only value-properties, the value will also be used as the label.
If you need to use the datacontract object, then just assign it to a variable in the select callback function of the autocomplete and you can use it as that.

Resources