How to set workflow fall into error.

Dear Expert,
I have a background step to generate and send out email. My problem is sometimes the email address will be blank. How can i do to set the workflow to error when it encounter this situation. I want to have this because when the workflow got stuck, i can manually go and replace the email address container and restart the workflow step so that the user will not miss the email part.
Anyone can guide me on this?
Thanks.
Regards,
Bryan.

Now here the condition is if the email id is not found you want to set the running step into error state right?
try to do like this
1. Set a flag as Email_Not_Found if this flag is set to X then pass the same value back to workflow conatiner and in the workflow tempalte define a condition step by using the same flag, if it is X then you raise a exception, Or you can simply loggically delete the workflow instance ,
2. If it is not X then the current running step should pass X back to workflow container and it should get completed successfully....
3. Here Instaead of raise exception, my advise is to simply Cancel the workitem by using the Process Control step, check the above mentioned article for more information about Process control step....

Similar Messages

  • How to set workflow to prevent system crash?

    Hi All,
      I have created workflow to run every time that a customer is changed and then call customized program in background mode. 1 Change will trigger 1 workflow to create 1 file.
      the workflow works fine with small amount of transaction. However, last time when we update 40000 customers using mass change (Transaction XD99). it caused the system crash. It used up all dialog process and background process.
      How can I prevent that?
    Thanks,
    Phon

    Now here the condition is if the email id is not found you want to set the running step into error state right?
    try to do like this
    1. Set a flag as Email_Not_Found if this flag is set to X then pass the same value back to workflow conatiner and in the workflow tempalte define a condition step by using the same flag, if it is X then you raise a exception, Or you can simply loggically delete the workflow instance ,
    2. If it is not X then the current running step should pass X back to workflow container and it should get completed successfully....
    3. Here Instaead of raise exception, my advise is to simply Cancel the workitem by using the Process Control step, check the above mentioned article for more information about Process control step....

  • How to set a program into backgroud job

    hi experts,i want to set a program into backgroud job.
    the original code like this:
    ...some statements...
    PERFORM FRM_SEND_MAIL USING WA_YA_LX.
    ...some statements...
    i want to set 'PERFORM FRM_SEND_MAIL USING WA_YA_LX.' into background job.
    is that code like this?
      CALL FUNCTION 'JOB_OPEN'
         EXPORTING
           JOBNAME  = WA_TBTCJOB-JOBNAME
           JOBCLASS = 'A'
         IMPORTING
           JOBCOUNT = WA_TBTCJOB-JOBCOUNT.
    PERFORM FRM_SEND_MAIL USING WA_YA_LX.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          JOBCOUNT                          = WA_TBTCJOB-JOBCOUNT
          JOBNAME                           = WA_TBTCJOB-JOBNAME
          SDLSTRTDT                         = SY-DATUM
          SDLSTRTTM                         = WA_TBTCJOB-SDLSTRTTM  .
    hunger for you advice,thanks a lot.

    See the following simple prog to schedule in background.
    You cannot schedule the subroutine i.e perform to run in background job. Instead write the subroutine in another program.
    to pass any value to that program, declare selection screen parameter and pass the value from the first one using submit.
    Job open
    call function 'JOB_OPEN'
    exporting
    delanfrep = ' '
    jobgroup = ' '
    jobname = jobname
    *sdlstrtdt = sy-datum
    *sdlstrttm = sy-uzeit
    importing
    jobcount = jobcount
    exceptions
    cant_create_job = 01
    invalid_job_data = 02
    jobname_missing = 03.
    if sy-subrc ne 0.
    write:/ 'error in opening a job'.
    endif.
    Insert process into job
    SUBMIT ZSDQ_BCK_TEST
    and return
    with p_type = 'F'   "Selection screen Parameter
    user sy-uname
    via job jobname
    number jobcount.
    if sy-subrc > 0.
      WRITE:/ 'ERROR PROCESSING JOB'.
    endif.
    Close job
    call function 'JOB_CLOSE'
    exporting
    *event_id = starttime-eventid
    *event_param = starttime-eventparm
    *event_periodic = starttime-periodic
    jobcount = jobcount
    jobname = jobname
    *laststrtdt = starttime-laststrtdt
    *laststrttm = starttime-laststrttm
    *prddays = 1
    *prdhours = 0
    *prdmins = 0
    *prdmonths = 0
    *prdweeks = 0
    *sdlstrtdt = sdlstrtdt
    *sdlstrttm = sdlstrttm
    strtimmed = 'X'
    *targetsystem = host
    RECIPIENT_OBJ = RECIPIENT_OBJ
    exceptions
    cant_start_immediate = 01
    invalid_startdate = 02
    jobname_missing = 03
    job_close_failed = 04
    job_nosteps = 05
    job_notex = 06
    lock_failed = 07
    others = 99.
    ***This is the second program which will run in background
    REPORT ZSDQ_BCK_TEST .
    TYPES: BEGIN OF TY_ADRC,
            HOUSE_NUM1 LIKE ADRC-HOUSE_NUM1,
            NAME3 LIKE ADRC-NAME3,
            NAME4 LIKE ADRC-NAME4,
            LOCATION LIKE ADRC-LOCATION,
          END OF TY_ADRC.
    DATA: IT_ADRC TYPE STANDARD TABLE OF TY_ADRC WITH HEADER LINE.
    Parameters: p_type type c.
    START-OF-SELECTION.
    SELECT HOUSE_NUM1
            NAME3
            NAME4
            LOCATION
           UP TO 40000 rows
            FROM ADRC
            INTO TABLE IT_ADRC.
           WHERE ADDRNUMBER = '0000022423'.
    IF SY-SUBRC = 0.
       LOOP AT IT_ADRC.
         WRITE:/ IT_ADRC-HOUSE_NUM1, IT_ADRC-NAME3.
       ENDLOOP.
       write:/ p_type.
    ENDIF.

  • How to set Maximum Character into OAMessageTextInputBean?

    Hi,
    Can anyone please show me how to set a maximum characters into an OAMessageTextInputBean programatically?
    Thank you.
    Jon

    TextInputBean.setMaximumLength(11);

  • How to set workflow status when workflow manually cancelled?

    Hi All,
    When i manually cancelled designer workflow, then status comes as 'cancelled'. Instead i need to set different status. How to  achieve this? 
    Thanks in advance!

    You can use this action
    Set Workflow Status
    This action is initially displayed in a workflow step as Set workflow status to Canceled. Use this action to set the status of the workflow. The default options are Canceled, Approved, and Rejected.
    You can enter a new status value in the dropdown in the action. Once you enter a status value, the entry is automatically added to the dropdown list. For example, you can enter a status that is more user-friendly and informative than Completed or Canceled,
    such as Expense Report Approved.
     NOTES 
    You cannot rename or delete a status value once it has been created. However, you do not have to use it.
    A custom status is applicable to the current workflow only, and cannot be used in another workflow.
    A workflow cannot use custom status values that you define in the action if the action is used inside an impersonation step.
    If the Set Workflow Status action is the last step in your workflow where you have also used a custom value, you can see your custom value in the Status column in
    the list upon workflow pausing or completion.
    Following is an example of what the action might look like in a workflow step,
    Set workflow status to Specification status: Ready for Design Review
    http://office.microsoft.com/en-in/sharepoint-designer-help/workflow-actions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376961.aspx
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • SUS Quantity tolerance for confirmation -How to set an warning or error Msg

    Hello All,
    Does anyone knows how do i configure SUS, so the system will check quantity tolerance in PO confirmation so the Supplier can knows that he is within or over the tolerance?
    I would like to set an error message so the supplier will confirm the PO within the tolerance or will reject it.
    Thanx a lot,
    Sheila Silva

    try the following:
    in transaction SPRO
    goto supplier relatioship management-> cross application basic settings ->set tolerence checks ,
    create a new tolerence group, for this group assign the folowing tolerence keys as required.
    PM: Quantity variance (converted to currency amount) - <b>this is the one relevant for you i guess.</b>If a confirmation is expected for a purchase order item, the system calculates the purchase order confirmation net price multiplied by the purchase order confirmation quantity. The system compares this sum with the defined upper and lower limits. You can also define percentage limits for the quantity variance check. Then the percentage variance from the expected quantity calculated - independent of the purchase order price - and this is compared with the defined percentage limits.
    PZ: Time overrun compared to purchase order
    The system determines how many days the delivery date has exceeded the planned time interval by. If the delivery date of the purchase order confirmation is earlier than the delivery date of the purchase order, the system takes the purchase order date - the confirmation date; If the delivery date of the purchase order confirmation is later than the delivery date of the purchase order, the system takes the purchase order confirmation date - the purchase order date. The system compares the number of days with the defined absolute upper limit.
    PR: Price variance (value variance from expected value)
    Here the variance between the purchase order confirmation and the purchase order price is checked. The system determines for the items the price variance as the product of the quantity in the purchase order confirmation multiplied by the price in the purchase order confirmation, and it compares this variance with the defined percentage and absolute upper and lower limits.
    then
    in transaction PPOMV_BBP, search for teh relevant vendor,
    assign the attribute "tolerence group"(TOG) to the newly created tolerence group for the relevent vendor.
    Regards,
    Chander

  • How to set a value into ogc:PropertyName

    Hello, I am trying to set a text value into the net.opengis.ogc.PropertyTypeName field. I have used XMLBeans to generate java classes for schemas in net.opengis.ogc. I am now trying to use the Java classes to create xml documents. I cannot figure out how to add a text value to the PropertyTypeField of a spatial operator. Please let me know...Thank you.

    I think, "visibility = false" is a rendered element, which is not display to the user (like a HiddenField). You should find the element in your HTML-code of your browser. A "rendered = false" element should be not rendered into HTML and not to find in the HTML-code.
    Regards
    Majo

  • How to set a value into a component visibility with expression builder?

    Hello,
    I want to set true/false value into a adf component visibility according to a bean object's value. if the object value is null then visibility value will be false, else visibility is true.
    How can I do that without an extra variable definition in the backing bean?
    Thanks, Ali

    I think, "visibility = false" is a rendered element, which is not display to the user (like a HiddenField). You should find the element in your HTML-code of your browser. A "rendered = false" element should be not rendered into HTML and not to find in the HTML-code.
    Regards
    Majo

  • How to Set Default Value into a Tabular Form Element

    Hi,
    Hoping someone can assist with my Tabular Form query.
    I am using Oracle ApEx v3.0.1
    I was wondering how one can set a default value to one of my tabular form columns within Oracle ApEx v3.0.1 as I cannot see how to do it?
    Thanks.

    Hi Tony
    can you pl. help me how you resolve this? I have one tabular form and I am trying to set default value as :APP_USER, I type this in default value but somehow it is not displaying this value.
    thanks
    Dax

  • ALV - How to set selected rows into internal table

    Hi all,
    I am tying to set with an 'X' flag the selected rows in my ALV using an internal table that contains all rows showed.
    More exactly I have tried to follow these steps.
    1) I have added the filed SEL (type SEL) to my ALV structure zrt_bo_slabsend and I defined my internal table in this way
         DATA: gt_report TYPE STANDARD TABLE OF zrt_bo_slabsend,
                    gw_report TYPE zrt_bo_slabsend.
    2) I have set gw_layo-box_fname = 'SEL' to gw_layo (ALV layout)
    Pressing the "delete button" that I have insert on the top of the ALV, I intercept correctly my user command and I call a form (named "delete_lines") where I have this abap code
    FORM delete_lines.
        DATA: l_subrc          LIKE sy-subrc,
            lw_grid_settings LIKE lvc_s_glay.
    gw_layo-box_fname         = 'SEL'.
                                     "set field name to store row selection
      gw_layo-edit              = 'X'. "makes whole ALV table editable
      gw_layo-zebra             = 'X'.
    gv_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY_LVC'
      exporting
          i_callback_program       = gv_repid
         i_callback_pf_status_set = gc_status
         i_callback_user_command  = gc_user_command
         is_layout_lvc            = gw_layo
         it_fieldcat_lvc          = gw_fkat
         i_grid_settings          = lw_grid_settings
          i_save                   = 'X'
          is_variant               = variant
          it_events                = gt_events
        TABLES
          t_outtab                 = gt_report
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      LOOP AT gt_report ASSIGNING <report> WHERE SEL = 'X'.
        DELETE gt_report.
      ENDLOOP.
    ENDFORM.
    I'd like to select many rows in my ALV report, than by pressing the delete button I'd like to see a refresh of my ALV, without the selected rows. I want to save it only at the end of my action, only by pressing the save button.
    Any suggestion about the abap code will be well appreciated.
    Thanks in advance for your kind help.
    Regards.
        Giovanni

    Hi Giovanni,
    I am using the method:-
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                =
    *   I_BUFFER_ACTIVE                   =
       I_CALLBACK_PROGRAM                = gd_REPID
       I_CALLBACK_PF_STATUS_SET          = 'UDIT'
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = 'Mainatin cell entry'
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT_LVC                     = GS_LAYOUT
       IT_FIELDCAT_LVC                   = I_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS_LVC             =
    *   IT_SORT_LVC                       =
    *   IT_FILTER_LVC                     =
    *   IT_HYPERLINK                      =
    *   IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
    *   I_SAVE                            = 'X'
    *   IS_VARIANT                        =
       IT_EVENTS                         =
       IT_EVENT_EXIT                     =
    *   IS_PRINT_LVC                      =
    *   IS_REPREP_ID_LVC                  =
       I_SCREEN_START_COLUMN             = 30
       I_SCREEN_START_LINE               = 14
       I_SCREEN_END_COLUMN               = 120
       I_SCREEN_END_LINE                 = 25
    *   IT_EXCEPT_QINFO_LVC               =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_ZCP_DEMAND_SYS1
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I have made five buttons on my toolbar (add, delete, save, back, exit).
    Kindly tell me how can I catch the sy-ucomm of these buttons.
    NOTE: this FM is written inside an user-exit, so I cannot make forms.
    Thanks in advance.

  • Workflow goes into error

    There is an invoice approval via workflow. Task is a foreground task(dialog method) and user gets a screen where he has options to approve/reject/ see the docu. Data has been passed to the task container via wf-task binding. task is using a method of delegated BOR. I get an error in workflow that container is not assigned.
    Most importantly it doesnot happen all the time. Is it any sync issue or something else. Please let me know.
    Thanks in Advance,
    Pritam

    Hi,
    Probable i got the solution. There was one defect in the binding of task. At the time of importing parameter(task --> WF) container element FIPP as well as WIOBJECT of type FIPP  was imported in the same parameter FIPP like this
    &FIPP& <-- &FIPP&
    &FIPP& <-- &_WI_OBJECT&
    This was the conflicting importing parameter.
    When i removed one of the importing parameter, error got disappeared.
    Thanks for your suggestions.
    Regards,
    Pritam

  • Setting BasicNativeContentViewerUI  results into Error

    Hi All,
    I am trying to use BasicNativeContentViewerUI in my swing application to view help files.
    SwingHelpUtilities.setContentViewerUI("javax.help.plaf.basic.BasicNativeContentViewerUI");        But i am getting the error "ContentViewerClass javax.help.plaf.basic.BasicNativeContentViewerUI doesn't exist"
    Here is the code snippet:
      try {
                java.net.URL url = null;
                url = HelpSet.findHelpSet(this.getClass().getClassLoader(), "Help/MyHelpSet.hs");
                hs = new HelpSet(null, url);
                if(hs != null)
                    SwingHelpUtilities.setContentViewerUI("javax.help.plaf.basic.BasicNativeContentViewerUI");
                hb = hs.createHelpBroker();
                hb.setSize(new java.awt.Dimension(800, 700));
                hb.setCurrentID("About");
               menuItem.addActionListener(new CSH.DisplayHelpFromSource(hb));
            } catch (Exception e) {
                System.out.println("Error : " + e.toString());
            }Thanks
    Nani

    Are you on an Apple ?

  • How to set a appointment into a calendar wich i've access?

    hi
    i'am working with outlook 365 for mac (Outlook Exchange). There i've access to the accounts of my staff. although i've authorisation to inscribe a appointment, I can not! Even if I have just open the claendar of a staff.
    What's going wrong?
    Thanks!
    Hallo
    Arbeite mit Outlook 365 für Mac und habe dort Zugriff auf freigegebene Kalender meiner Mitarbeitert. Ich habe zwar die Berechtigung Termine in den anderen Kalendern einzutragen, kann dies aber von meinem Mac aus nicht tun. Immer wenn ich einen Kalendereintrag
    mache, auch wenn ich nur den Kalender eines Mitarbeiters offen habe, wird der Termin in meinem Kalender abgelegt.
    Was mache ich falsch?
    Danke

    Hi,
    Have you checked the permission of the calendar of that staff?
    There are some permission levels for reference:
    Availability Only: This will only display your Free/Busy time but will enable the recipient to have your Calendar appear in their Calendar list.  Otherwise, all users can view your Free/Busy information via the Scheduling Assistant in a New Meeting
    request.
    Limited Details: This will allow your Free/Busy and the subject to be available to the recipient.
    Full Details: This will allow your Free/Busy and the subject and body to be available to the recipient.
    Editor: This will allow your Calendar to be completely available and allow the recipient to change existing appointments and meetings.
    Delegate: This will allow your Calendar to be completely available and will send your meeting requests to this recipient to act on.  Additionally, a delegate can schedule meetings on your behalf.
    Best Regards.

  • How to set error message inside the loop...module pool

    Dear all,
         Am creating Table Control without wizard. In that i am looping the values, that is, Once if i entered 5 digit values means, 12345-08... the values should be stored in z-table like this 12345,12346,12347,12348 . That is 5-8 it as to update in z table. for this i createdloop at itab and inside that i written a code to count the value and all. and also its clearly updating the value in ztable too. now i want to know, if once again i entered the same value means, like 12345-08.. it as to show error messge.I dont know how to set the condition with error message inside the single loop .... Its all comes under module pool program.
    Thanks,
    Santhosh.R

    If i understood your doubt, here goes the answer.
    LOOP AT itab INTO wa_itab.  " This is your loop
      l_tabix = sy-tabix. "l_tabix receives the line of the loop
      READ TABLE itab WITH KEY itab = wa_itab.  "itab is the same tab of your loop
      IF sy-subrc EQ 0 AND l_tabix NE sy-tabix.    "Here the sy tabix have the value of the read table.
    *     Here you do your error treatment.
      ENDIF.
    ENDLOOP.
    Explanation: When you are looping your internal table, you use a READ TABLE to see the already recorded registers. If the read table finds one register (sy-subrc EQ 0) and the this register is not the one of the current line (l_tabix NE sy-tabix). It means you have a duplicated register.
    Maybe there is someway easier to do this, but this is what i thought now.
    I hope this was your doubt hehe.
    Thales Schmidt

  • Workflows which went into error

    Hi,
    Is there any standard way to determine which all workflows moved into ERROR status for the given time
    period? The transaction SWI2_DIAG will give you workflows which are in ERROR, but there they check
    the workflow creation time.
    Thanks,
    Aravind

    That one is workitem creation date and time. I want the time during which workitem moves into error status.
    Workitem might be created today, but the status might change to ERROR tomorrow.
    Thanks,
    Aravind

Maybe you are looking for

  • My TV Playlists do not show up on my new AppleTV

    Hi, When I go to my TV shows (That I own and purchased from iTunes) with my new Apple TV I get three choices at the top: By Date, By Show, Unwatched. I can't find any of my TV playlists. I just upgraded to the new Apple TV and have been using the old

  • Us Payoll : Tax Model Changes : Creation Of A New Tax Class : Impact

    Hi Experts, Has anyone earlier created a new tax class specification of PC 71 for a wagetype so that it is taxed only for a particular tax authority , if yes how did you handle the impact on the other tax authorities ,did you create new entries ( wit

  • Encrypted blank disk image, actually encrypted or just password protected ?

    I created 200 GB blank disk image on external drive using disk utility with options 128 bit encrytion. I have thought that the data copied to the disk is just password protected not encrypted as such. I came to conclusion as when you encrypt Mac inte

  • OCR: urgent

    Hi,     Scenerio: My robot have to use the images it acquire of the surroundings and LabView will have to be used to perform OCR operation on these images and upon spotting the target(for example: the target is No:1)  wanted, it wil then cause my rob

  • AUS : Why no TV show purchases on AppleTV 2nd Gen?

    Hi All, I have recently purchased an ATV2... My Apple TV (1st Gen) still shows a list of TV shows that can be purchased from iTunes, as does my iMac running iTunes 10.5.1. Why is it that my new Apple TV (2nd Gen) cannot?