The SCN wiki will not be available for new content submission starting September 4th 6PM CET until September 7th 6PM CET. Please plan your SCN wiki tasks accordingly.
The scenario is to get approval for leave application which is in smartform format and after getting the approval a PDF leave report is to be generated.
Steps: in SWDD
1.) Create a USER DECISION step for accepting or rejecting the leave request and in the workflow container create an element FORNAME to accept form name from the user.
2.) If the request is accepted create an ACTIVITY task, where u shall provide a task to convert the leave request from smartform to PDF format, if the leave request is rejected than generate a rejection mail and send it to the user.
3.) If approved, create a Business Object in SWO1 and create methods like SSF_COVERT_TO_PDF and DISPLAY_PO .
for method SSF_COVERT_TO_PDF declare one parameter FORNAME of type STXFADM.
coming back to SWDD
4.) In the activity step create a task and in the task container create fields to accept the forname from workflow and returning table from the method.
5.) Establish a Mapping between the Task and the Workflow.
6.) Establish the binding between workflow & task.
7.) now create another user desicion for printing and downloading the PDF file on to your local system.
8.) If the decision is YES than create an ACTIVITY and again provide the Object and the method DISPLAY and give the following code in display method.
in the task container give the following element.
create binding between task & method , also binding between Workflow and Task.
save and activate the workflow.
now test the workflow by providing the SMARTFORM name in FORNAME element,
but the form should not have any input interface parameters.