Function block/method definitions (X4 SAP JCo 2)
Within a configuration document (by default <X4>/X4DB/0/jco_method_def.xml
) you can assign via the JCo 2 Server a corresponding X4 process for further processing for each function block (method), which is addressed by the SAP host.
Within the central configuration file <X4>/X4config.xml
a function block/method definition must be referenced for each JCo Server instance.
Expected XML structure
Within the function block/method definition, you can create any number of <method>
elements within the root element <definitions>
by following this pattern:
<method>
<name>Function block/method name</name>
<wait_for_result>Boolean value</wait_for_result>
<class>de.softproject.integration.sapjcoserver.requesthandlers.WorkflowStarter</class>
<properties>
<property Name="workflowname">Path to the X4 process</property>
<property Name="userID">User folder within the X4DB</property>
<property Name="raw">Boolean value</property>
</properties>
</method>
The following applies for each function block/method definition:
The element
<name>
contains the name of the function block (method) called by SAP; The placeholder*
represents all other function blocks, for which no explicit function block has been defined.Within the element
<wait_for_result>
you can configure whether SAP should wait for the result (false
), or the function block/method call should be made asynchronously (true
).The element
<class>
specifies the used class, which is stored for the processing of the function block or method (by defaultde.softproject.integration.sapjcoserver.requesthandlers.WorkflowStarter
for starting X4 processes); Within the child elements of<class>
you specify the corresponding properties in an element<property>
.
For the X4 process starter class, the following properties are specified:
workflowname
: Path to the X4 process, which takes over the processing of the function block/method calluserID
: Repository user folder containing the X4 processraw
: Process IDoc in raw format (true
) or (false
)
Compatibility notes
In older function block/method definitions you may find additional details within the elements <type>
and <property name = "languageID">
. They have no function and may be omitted therefore.
Example
In the following example the X4 process save_idoc.wrf
is called for the function block (method) ORDERS05
and data in the IDoc raw format is provided for the downstream processing.
<method>
<name>ORDERS05</name>
<wait_for_result>false</wait_for_result>
<class>de.softproject.integration.sapjcoserver.requesthandlers.
WorkflowStarter</class>
<properties>
<property Name="workflowname">Project/Folder/ProcessIDoc.wrf</property>
<property Name="userID">1</property>
<property Name="raw">true</property>
</properties>
</method>