Summary
How do you include the value of a custom organization attribute in the vendor dictionary of FNP trusted activation responses?
Question
How do you include the value of a custom organization attribute in the vendor dictionary of FlexNet Publisher trusted activation responses?
Answer
We provides a sample class, VendorDictResponseGenerator in site/samples/trusted, that can be used as an example to populate vendor dictionary values in FNP trusted activation responses. This sample can be modified to populate the vendor dictionary with the value of a custom organization attribute from any of the organizations in the channel partner set of the fulfillment's entitlement.
Once compiled against the FlexNet Operations public API, placed in the custom/webapps/flexnet/WEB-INF/classes directory, and deployed, the name of this callout is configured in FlexNet Operations in System -> Configure -> Trusted Storage -> Generator for Custom Attributes in Online Response. Once configured, the server must be restarted.
This example will populate the vendor dictionary with the fulfillment ID and the non-null value of an organization text attribute named ORG_TEXT from the organization in the End Customer tier of the simple entitlement. In this simple case where the organization in the End Customer tier is used, the getSoldTo method can be used instead of traversing the entire channel partner set of the entitlement.
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
import java.util.List;
import com.flexnet.operations.publicapi.CustomAttribute;
import com.flexnet.operations.publicapi.EntitlementLineItem;
import com.flexnet.operations.publicapi.FulfillmentRecord;
import com.flexnet.operations.publicapi.FulfillmentRequestTypeENC;
import com.flexnet.operations.publicapi.OperationsException;
import com.flexnet.operations.publicapi.OrganizationUnit;
import com.flexnet.operations.publicapi.SimpleEntitlement;
import com.flexnet.operations.publicapi.VendorDictionaryResponse;
public class VendorDictResponseGenerator implements VendorDictionaryResponse {
public Map<String, String> getResponseVendorDictionary(FulfillmentRecord fr, boolean isSuccess,
FulfillmentRequestTypeENC operationType) throws OperationsException {
Map<String, String> responseMap = new HashMap();
if (fr != null) {
responseMap.put("FULFILLMENT_ID", fr.getFulfillmentId());
EntitlementLineItem eli = fr.getLineItem();
SimpleEntitlement se = eli.getParentEntitlement();
OrganizationUnit soldTo = se.getSoldTo();
List<CustomAttribute> attrs = soldTo.getCustomAttribute();
Iterator<CustomAttribute> iter = attrs.iterator();
while (iter.hasNext()) {
CustomAttribute attr = iter.next();
if (attr.getName().equals("ORG_TEXT") && attr.getValue() != null) {
responseMap.put("ORG_TEXT", attr.getValue());
}
}
}
return responseMap;
}
}
The following entries are added to the response:
Vendor dictionary entry: FULFILLMENT_ID = <fulfillmentId>
Vendor dictionary entry: ORG_TEXT = <orgAttrValue>
Related Articles
Building of the Production FNP Licensing Toolkit for Trusted Storage may result in the error: Trusted config processing fa… 11Number of Views Send Vendor Information to Flexnet Operations During Activation 10Number of Views How do You Repair a Trusted Storage Activation When it's in The **DISABLED** State? 6Number of Views Binding Element for Trusted Storage in FlexNet Publisher 12Number of Views Display a Custom Dialog Depending on the Value of a Custom MSI Property 4Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago