Background method in workflow hangs

Hi All,
I have a background method in workflow which calles a report. Actually the report calles smartforms and I am storing OTF data on application server. I am not displaying the print preview. I am just stroring the OTF data on application server.
When I explicitely execute the report from SE38 in background (using F9) file is getting generated on application server. But when I call this report from method of a workflow, method execution remains in process. And file is not generated.
I have used the RETURN statement while calling it from workflow method. What could be the reason for this??
Thandks in advance,
Neha Yeralkar.

Hi,
Calling transaction and Submit programs are usually reserved for dialog methods, where essentially all the workflow needs to do is take the agent to the transaction or program where the user can complete the business activity. For background methods usually call function modules or BAPIs are used where the business activity is performed automatically without any user involvement. Moreover it will help you in handling exceptions returned from Function modules. Also define the method exception explicitly based on the exceptions of FM, inorder to track it down if it occurs.
Regards, Saud

Similar Messages

  • Workflow hanged- Background Task in Process.

    Hi All,
    Workflow hanged at background task with status in Process due to a dump…we change the logic now.
    How I can restart this task again?
    I checked in SWPC its empty.
    Thanks,
    KP

    Yes, SWI2_DIAG has a Restart Workflow' button.
    Did you try it already?
    Despite what the button name suggests, it 'resumes' the workflow from the current step
    (it doesn't 'restart' from scratch).
    cheers
    Paul

  • Automator workflow hangs indefinitely after running Python script

    Hello,
    I have an Automator workflow set up to use a one-line shell script to launch a Python script. The Python script has a GUI and stays open for the user to interact with it. It launches fine, but I've noticed that my Automator workflow hangs and the spinning workflow cursor won't disappear from the menu bar unless I manually kill the workflow or quit the Python app. Not a huge deal to kill it manually, but annoying.
    I saw someone posted a way to kill an Automator workflow using an AppleScript or shell script embedded within the workflow, but adding that as a second step doesn't work for me—the Automator workflow never gets to that step, presumably because it's waiting for my Python app to close. Anyone know a way to make the Automator workflow kill itself after launching a Python script?

    By default, AppleScript (and, by extension, Automator) will wait for theshell process to exit before continuing the workflow (or exiting if the shell script action is the last step.
    This can be overcome by launching the shell process as a background process, which returns control to AppleScript/Automator, and allows your workflow to continue (or end).
    Just append:
    &> /dev/null
    after your shell command to launch it in the background, e.g.:
    /usr/bin/python /path/to/your.py &> /dev/null
    and you should get what you expect.

  • How to use secondary method in workflow?

    Hi friends,
    can anyone plz let me know how to use secondary methods in workflow? it would be helpful if u explain with an example..
    thanks and regards,
    Arun.S

    Hi Arun Kumar,
    The Sec Method can be used in the user decision step. The secondary methods are executed along with the user decision step. You have 3 options. Either execute a secondary method before executing the user decision step or after execution of user decision step or while executing the user decision.
    For this define the methods either in Methods before execution of workitem execution to execute it before user decision step or Methods after execution of workitem so as to execute it after the execution of user decision.
    In order to execute a method along with user decision step execution use secondary methods (amodal call.)
    Let me know if you have any queries.
    Regards,
    Raj

  • How to call java method from workflow script?

    Hi
    I have a requirement of updating field value 'Document Status' based on review/approve of content from Workflow and hence need to update the version number. For that I need to call my java method from workflow during submit of review/approve condition. Please let me know how to call java method from workflow?
    Is there any alternative better way to achive this requirement from workflow? Please suggest.
    Thanks,
    Sarang

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • ABAP OOP method in Workflow task 6.20

    Hello all!
    In the following blog /people/jocelyn.dart/blog/2006/07/25/using-abap-oo-methods-in-workflow-tasks it is mentionned that to enable OOP methods for workflow tasks on 6.20 one needs to run report SWF_CATID.
    I'm currently on a customer system 6.20 ABAP SP50 and this report simply does not exist. Is this report appearing in a later support pack or is this not available until 6.40 as I belived....
    Any advise on how to enable this on an above system is highly appriciated!
    Regards
    Martin Jonsson

    Hi,
    Check this Report - RSWF_CATID.
    Regards,
    Surjith

  • Relationship between events, Methods,Container, & workflow

    Hi all,
    could you pls navigate through the hierarchical steps linking the above and explain the role/usage of these with a simple example.
    thanks,
    Subba

    Thanks Rajan,
    i need to understand the technical components involved in the flow..
    so if i have a <b>scenario</b> like:
    1) user creates and saves a Purchase order
    2) his superior should get a mail to release/hold the PO
    3) if yes then PO should be released.
    so how would the events, containers, BOR methods and workflow container look like.
    Thanks,
    Subba.

  • WorkFlow hangs

    Hi,
    I'm receiving the below error on SCSM each day during night and all workflow hangs, any idea?
    Mom failed executing SQL Job p_DataPurging.  Details: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding..
    Regards
    Antoine AL Ibry

    Yes true,
    I know this is due to SQL Stored Procedure dbo.p_dataPurging failed.
    checking the Job by:
    select
    top 1000 * from InternalJobHistory (nolock)
    where
    Command like 'Exec dbo.p_DataPurging'                    
    Order
    by InternalJobHistoryId desc
    Show Status id 0 with NULL Finished date
    Regards
    Antoine AL Ibry

  • Workflow Hanging

    Hi,
    I have a Workitem( for a background task ) which is in Status 'In Process'  from a long time. basically the Workflow is Hanged.
    Is there any way i can complete the workitem and Workflow will continue from this point.
    Its urgent issue.
    Thanks in Advance...
    Vaibhav

    Hi,
    Due to system crash or some other reason, the workflow & Workitem is in status ' In Process' . So i am not able to use SWPR, as the workflow is not errored out.
    If i manually complete the workitem using SWIA,
    Will the method be called and the container elements be filled out  ?
    Or simply the status will be changed to completed and workflow will continue ?
    Please advice as this i need to do in Production system.
    Do i have to change the Container element values also, as this workitem will get the agent names.

  • Stuck with Foreground and Background processing in Workflow

    Hi All,
    I have a BDC that is acting as a method in the Business Object. The requirement is something like this: The scenario is in the Utilities System. When a customer pays a security deposit a PM (Plant Maintanence) Service Order has to get created automatically in the background. I have a BDC for creating the Service Order but the thing is that if I make that task which runs the BDC as foreground and give the agent assignment it works absolutely fine and the service order gets generated, but if I make the same task as background the Service Order does not get created. I am heavily stuck with this issue.
    Has anybody encountered the same issue ?
    Best Regards,
    Sudhi

    Sudhindra,
    Are you checking for errors after the BDC Call Transaction? What I normally do is to use the Messages into option of the BDC call and return the messages to the Task Container in case of errors.
    Reasons why the method does not work in background is possibly due to authorizations or the WF-BATCH user being not known to the PM system. For instance when I create PM notifications in WF in background, I have to translate the WF initiator's user id to their Personnel Number for the Resp. Person field. If in your workflow the prior step to creating order is a dialog step, you can also try the Advance with dialog option on the background step.
    Cheers,
    Ramki Maley.

  • Workflow Hanging in between the Tasks

    Hi all,
    We are having problem with the workflow which are hanging in between the tasks. Yes, it is in between the tasks.
    the workflow structure have a fork with 4 braches, 3 out of 4 need to complete before the rest of workflow can contiune.
    one branch is already reached the end point, however 2 of the branch are stuck, all the related tasks within these 2 branches are completed, however they could not reach the end point.....bascially in the log, it shows the last step are completed, but for some unknown reasons, it didnt reach the end point of the fork.  I have checked the worfklow defintion, no more task are between this last step to the end of fork for both branch. (the fourth branch is for logical delete purpose). Current workflow status is 'In Progress'.
    Surely we have some more steps after the fork, that why I cannot let this workflow terminate at this point. Also as it had already done a lot of master data change before,  therefore I cannot simply restart the workflow from begin as well.
    I have try to the following method without any sucess, do anyone have other suggestion?
    1. SWPC
    2. Change the workflow to Error status and restart (SWPR)
    3. Execute all workflow runtime backjobs, ie. RSWWERRE, etc.
    4. Update runtime buffer
    5. Checked suspended workflow callbacks and deadline callbacks.
    6. All methods mentions in OSS note 1098805.
    Surely if you know how to terminate the FORK or in the table to force the FORK counter to reach 3, may be I can contiune this workflow. anyway, please help.
    Thanks in advance,
    Derek.

    Rick,
    Not really,
    1. one branch is already reached the end point
    2 and 3. Stuck (the last tasks were completed, no more task between them and the end fork)
    4. termination event.
    due to this client policy I cannot put up the image into some external site to show.
    basically the graphic log is looked like...for both 2 and 3. the green arrows start from the last step on the branch, but stop in the middle. cannot reach the end of fork that point.
    Look into definition, I can confirm that we have no more tasks there......
    Derek.
    Edited by: Derek Cheng on Jul 9, 2010 5:22 PM

  • Problem in executing report in background in CS workflow

    Hi All,
    I am using ECC 6.0 version.
              In my scenario , Once notification is closed , workflow should trigger. and along with this , one report should execute in background with input parameter as a Notification no. from workflow . Report  should pick up input parameter dynamically.As I know instead of function module we can choose report option in business object .
               My question is how that report will get input parameter as notification no.& How I do the binding for this (Between report & workflow)?
                Valuable suggestions are excepted.
    Regards,
    Sheetal

    Hi Sheetal,
    As I had mentioned earlier (you have already implemented), add the report to your BO as a method. Then click on method and then click 'Parameters'. Create the required parameters, which is 'Notification No.' and go to the system generated 'Program'. Here you will have to do a bit of macro coding. Obtain the No. (once you add as parameter, you will get it through binding) and pass to report.
    You might also retrieve (only if required or only in certainb cases) values, for that observe how the attributes are retrieved on the basis of key field.
    Best regards,
    Abir.

  • Why cant I bebug BO Method from Workflow decision step

    I have been trying for a while to find a solution. I have activated BO Debugging. I have set BO method as advance with dialog. all my efforts in vein. I could debug directly from SW01 but not from SBWP.
    Is there any trick to debug a BO method. I have a task to execute a custom BO method "approve" after user decides to approve workitem.  I am sure this method is getting executed but but not stopping there because I have put a error message which is being displayed.
    your earliest response is much appreciated.
    Regards
    Kasi

    Murthy,
    You have little wrong perception about your workflow logic (As I understood from your description, may be I have not understood it proper).
    You said that you put the break point on your BO method.
    well user decision is always based on BO DECISION method PROCESS (unless you have created your own screen), Now you might have different buttons on your user decision (say approve/reject/cancel and keep etc), so if you wish to debug this (BO decision method Process) you can,
    but the task which got executed once you click on this buttons might be bacground task (based on your BO's method) and you can not debug the background task. Ofcourse there are several indirect ways to debug this, pls search forum for that.
    Hope it will help.
    Cheers
    Jai

  • Workflow hanging - ST22 and SWU2 empty

    Hi all,
    Some of my workflows are regularly hanging (i.e. background task stuck in status "In process"). This happens on a random basis, and the only way to continue them is via SWPC.
    When I look at short dumps in ST22 or at tRFC in SWU2 I do not see anything related to these workflows.
    Is there any other place where I should check?
    I am on ECC6, basis 7.00.
    Thanks,
    Patrick

    If the updates are not clearly packaged into consistent LUWs then you may end up with a deadlock or other problems during the update.
    @Mike : I totally agree to the fact . However we don't have much choice while using standard BAPI's.
    We used to face this problem very frequently. Although it never got solved following were certain observations.
    1. The frequency of  WF tasks hanging increased during high server loads. e.g. no of batch jobs running at their max
    2. Somehow this seems to be linked to locks.
    3. We raised OSS message but could not replicate this intermittent problem.
    4. We rescheduled some jobs, hardware got upgraded (as scheduled) and during that time we saw a decline in such issues

  • Background step in workflow remains in process: Workflow gets stuck up

    Hi Gurus,
    I have custom workflow for organization management. The workflow takes information from e-forms(notifications) and updates the infotypes.
    The step which updates infotypes is run as background step.However in some cases the workflow gets stuck up in this step.
    This happens irregularly (once or twice in a month).
    On processing these workflow instances using SWPC , nothing happens and the workflow remains stuck up in the same step.
    Also checked for dumps but nothing available under WF-BATCH.There is no regular pattern for occurance of these instances.
    Can you please suggest what can be the possible cause of them getting stuck up in the background task.
    Regards,
    Rohit

    Check ST22 shortdumps again. Look not only for WF-BATCH but also look for the intitator or the last processor's ID. Sometimes they would be the assigned the user to execute the step ecven if it's a background task.
    Also, I would suggest looking through the code of the method that is being executed carefully. Make sure there are no 'EXIT' or LEAVE' statements. This could also 'sometimes' cause the background process not to return correctly. In addition, check that you are not executing an ever lasting loop.
    If you have access in PRODUCTION, try to execute the method in debug mode to see where the program is inappropriately stopping (t-code SWO1).
    Derrick
    Banks & Company, LLC

Maybe you are looking for

  • How to fix a corrupt .avi file (from capture in CS3)?

    So I was recording a VERY long meeting at work and recorded it to my PC via Premiere. Since the recording was unattended, the file size is 275GB! I didn't really think anything would go wrong since I have recorded large .avi files in the past. Well w

  • Airplay symbol stopped showing on iOS5 devices

    Airplay symbol used to show on iPad2 and iPhone4S for use with Apple TV(2).  Now it just stopped showing up. I tried reset of ATV.  All devices are on the same wireless network.  All devices are logged into the same iTunes account. Any suggestions?

  • Updating Zend Framework

    How can I update Zend Framework in Flash Builder 4? Flash Builder currently installs version 1.10.1 of the Framework, and I want to install version 1.10.7 I need to install the newest version of Zend Framework because I have a problem with Network Mo

  • Why is firefox not responding--it takes forever for my typing to appear in a google search box what is happening

    there is a lag between openong up a google search page and getting my typed words to appear in the google box--something is preventing firefox from responding immediately --what gives

  • Invalid plug-ins with Reader 9

    I cannot open PDF files-- or Adobe Reader itself-- because I immediately receive a message "Invalid plug-ins Adobe Reader will close", which it does immediately.  I unistalled Reader and reinstalled it but still there seems to be an invalid plug-in.