![]() |
Copyright © Cloud Software Group, Inc. All Rights Reserved |
For additional conceptual information about the use of context parameters in ActiveMatrix, see TIBCO ActiveMatrix Service Grid Component Development.Using the code-first approach (it is not possible to create context parameters when using the WSDL-first approach), you expose the context parameters in the WCF implementation by decorating methods with the ContextParameter attribute. The ContextParameter attribute and its properties determine the Operation, Type, and Direction of the context parameters available to ActiveMatrix Implementation Type for Microsoft CLR components in ActiveMatrix.Add the ContextParameter attribute to the desired methods using the syntax:[ContextParameter("Parameter-Name", Direction.INPUT|OUTPUT)]Parameter-Name must match either a field or a property in the same class as the service method, while the Direction setting identifies whether the data will be injected (INPUT) into the operation, or pulled out of (OUTPUT) the operation.
The method name in the code equates to the operation name in the WSDL, so the method you decorate with the attribute determines the context parameter’s Operation name in TIBCO Business Studio. The Parameter-Name determines the name of the context parameter, while the Direction setting determines the direction.Table 4 shows how the values in the Context Parameters table in TIBCO Business Studio are determined:
Table 4 Context Parameters The name of the data item specified by the Parameter-Name in the ContextParamter attribute. This value identifies where the context parameter data is injected or pulled from, as determined by the Direction. The name of the method that the ContextParameter is decorating. To configure a Fault, the Parameter-Name must point to a declared fault. The datatype of the item specified by the Parameter-Name.
•
• Message - the data item is a complex object that is declared with a MessageContract. Any context variable that you want to pass as a message type must be declared using MessageContract. See Define Message Types for additional information about defining Message types.
1. Identify the data item specified by the Parameter-Name as a Message type by declaring the item using MessageContract.
−
− Also do not use the MessageHeaderAttribute in a message context parameter.
2. Identify definitions in the Message by decorating members with the MessageBodyMember attribute.
![]() |
Copyright © Cloud Software Group, Inc. All Rights Reserved |