The same JavaScript binds are available for all business rules, using the functionality exposed in the public Java API. JavaScript in a business rule will have access to the standard Java packages and connection into the STEP Java API can be created via binds where Java objects are bound to JavaScript variables. For more information, click the STEP API Documentation button on the WebStart page, and see the Javadoc link under the Extension API section.
The following documentation addresses the binds, regardless of their use. For steps required to add a JavaScript bind, see Adding a Bind here.
Important: STEP data should only be changed via an Execute JavaScript business action. Changing STEP data via an Evaluate JavaScript business condition is not supported. See the JavaScript Considerations topic for more info and suggested uses.
The STEP Scripting Java API binds are available in the groupings listed below:
|
Bind |
Resolves to |
|---|---|
|
Approve Context Bind
|
|
|
Approve Context |
For business actions, instance of com.stibo.core.domain.spi.approve.ApproveTrigger.ApproveTriggerContext and the type specific sub interface (e.g. com.stibo.core.domain.spi.approve.ApproveProductTrigger.ApproveProductTriggerContext). For business conditions, instance of com.stibo.core.domain.spi.approve.ApprovePlugin.ApproveContext. |
|
Asset Related Bind (here) |
|
|
Asset Importer Configuration |
com.stibo.assetimporter.domain.configuration.AssetImportConfiguration. |
|
Attribute Related Binds (here) |
|
|
Attribute |
Instance of com.stibo.core.domain.Attribute for the selected attribute. |
|
Attribute Group |
Instance of com.stibo.core.domain.AttributeGroup for the selected attribute group. |
|
Attribute Validated Parameters |
User input as java.lang.String. |
|
Attribute Value |
java.lang.String value for the selected attribute. |
|
List of Values |
Instance of com.stibo.core.domain.ListOfValues for the selected list of values. |
|
Unit |
Instance of com.stibo.core.domain.Unit for the selected unit. |
|
Unit Group |
Instance of com.stibo.core.domain.UnitGroup for selected unit group. |
|
Business Rules (here) |
|
|
Business Function |
Instance of com.stibo.core.domain.businessrule.businessfunction.BusinessFunction for the selected business function. |
|
Current Object Bind
|
|
|
Current Object |
Instance of com.stibo.core.domain.Node and the sub interface for the type that the business rule is evaluated/executed against. E.g. com.stibo.core.domain.Product or com.stibo.core.domain.entity.Entity. |
|
Data Container
|
|
|
Current Data Container Object |
Instance of com.stibo.core.domain.datacontainerobject.DataContainerObject. |
|
Pair Of Attribute Values |
Instance of com.stibo.core.domain.value.simplevaluepair.SimpleValuePair. |
|
e-Signature Related
|
|
|
Basic e-Signature |
Instance of com.stibo.basicesignature.domain.BasicEsignature. |
|
Event Binds
|
|
|
Current Event Batch |
Instance of com.stibo.outbound.businessactionpreprocessor.EventBatch. |
|
Current Event Queue |
Instance of com.stibo.core.domain.eventqueue.EventQueue. |
|
Current Event Type |
Instance of com.stibo.core.domain.eventqueue.SimpleEventType. Can be a derived event type (com.stibo.core.domain.eventqueue.DerivedEventType) or a basic (core) event type (com.stibo.core.domain.eventqueue.BasicEventType). |
|
Event Queue |
Instance of com.stibo.core.domain.eventqueue.EventQueue for the selected event queue, outbound integration endpoint or event processor. |
|
Event Type |
Instance of com.stibo.core.domain.eventqueue.DerivedEventType for the selected derived event type. |
|
Gateway Integration Endpoint Bind
|
|
|
Gateway Integration Endpoint |
Instance of com.stibo.gateway.rest.REST given that the selected gateway integration endpoint is REST based (currently the only option). |
|
GDSN Product |
Instance of com.stibo.gdsn2.domain.model.GDSNProduct. |
|
GDSN Provider Datapool |
Instance of com.stibo.gdsn2.domain.model.configuration.GDSNProviderDatapool. |
|
GDSN Provider Message Exception Description |
java.lang.String. |
|
GDSN Provider Message Exception File |
java.io.File |
|
GDSN Provider Message Original File |
java.io.File |
|
GDSN Provider Original Node |
Instance of com.stibo.core.domain.Node |
|
GDSN Publisher Data Map |
Instance of com.stibo.gdsn2.domain.datamap.GDSNDataMap. |
|
GDSN Publisher Product Validation |
Instance of com.stibo.gdsn2.domain.impl.businessrules.GDSNValidationContext @Deprecated. |
|
GDSN Receiver Data Map |
Instance of com.stibo.gdsn2.receiver.domain.impl.businessactioncontext.GDSNReceiverDataMapContext. |
|
GDSN Receiver Message Exception Description |
java.lang.String. |
|
GDSN Receiver Message Exception File |
java.io.File. |
|
GDSN Receiver Message Original File |
java.io.File. |
|
GDSN Receiver Original Node |
Instance of com.stibo.core.domain.Node. |
|
GDSN Receiver Packaging Product |
Instance of com.stibo.core.domain.Node. |
|
GDSN Recipient |
Instance of com.stibo.gdsn2.domain.model.configuration.GDSNRecipient. |
|
GDSN Target Market |
Instance of com.stibo.gdsn2.domain.model.configuration.GDSNTargetMarket. |
|
Mongo DB Binds
|
|
|
JSON Document |
A JSON object for the document that has been stored in the MongoDB database. |
|
MongoDB Context |
Instance of com.stibo.components.mongodbadapter.server.MongoDBActionContext. |
|
Object Aspects Binds
|
|
|
ID |
ID of the com.stibo.core.domain.Node that the business rule is evaluated/executed against as a java.lang.String. |
|
Name |
Name of the com.stibo.core.domain.Node that the business rule is evaluated/executed against as a java.lang.String. |
|
Other Binds
|
|
|
Conditionally Invalid Values |
java.util.Set<com.stibo.core.domain.Value> |
|
Import Change Info |
Instance of com.stibo.core.domain.importer.changeinfo.ImportChangeInfo. |
|
Logger |
Instance of java.util.logging.Logger. |
|
Lookup Table Home |
com.stibo.lookuptable.domain.LookupTableHome. |
|
Mail Home |
com.stibo.mail.home.MailHome. |
|
Reference Type Bind
|
|
|
Reference Type |
Instance of com.stibo.core.domain.ReferenceType for the selected reference type. |
|
Secondary Object Bind
|
|
|
Secondary Object |
Instance of either com.stibo.core.domain.Product or com.stibo.core.domain.entity.Entity. |
|
STEP Manager Bind
|
|
|
STEP Manager |
Instance of com.stibo.core.domain.Manager. |
|
Survivorship Rule Source Objects Bind
|
|
|
Survivorship Rule Source Objects |
java.util.Set<com.stibo.core.domain.entity.Entity> |
|
Tree Object Binds
|
|
|
Asset |
Instance of com.stibo.core.domain.Asset for the selected asset. |
|
Classification |
Instance of com.stibo.core.domain.Classification for the selected classification. |
|
Entity |
Instance of com.stibo.core.domain.entity.Entity for the selected entity. |
|
Product |
Instance of com.stibo.core.domain.Product for the selected product. |
|
User Binds
|
|
|
User |
Instance of com.stibo.core.domain.User for the selected user. |
|
User Group |
Instance of com.stibo.core.domain.Group for the selected user group. |
|
Workflow Binds
|
|
|
Current Transition |
Instance of com.stibo.core.domain.state.currenttransition.CurrentTransition. |
|
Current Workflow |
Instance of com.stibo.core.domain.state.Workflow. |
|
Workflow Parameters |
Map<java.lang.String, java.lang.String> |
|
Workflow State |
Instance of com.stibo.core.domain.state.State. |
The Global Binds available in Matching Algorithms are different from business rule JavaScript binds. For more information about matching algorithm binds, see the Configuring Match Codes section of the Matching, Linking, and Merging documentation here.
2018, Stibo Systems