Workflow Event Scripts

Is there a way too store a work flow events idoc script in an external location (eg. file) and call it from within the workflow event. What I am after is a way to encapsulate common workflow business rules in one place and call them.  We have several repeating rules that are used in all of our offices as well as office specific rules which are all currently in separate files.  We would like to factor out the common rules into a parent flow so if there is a change to the common set we only have to change it in one place instead of each file. Thank you.

Yes: use the Idoc Script function docLoadResourceIncludes.
http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c08_config_ref.htm#CSIDO721
Jonathan
http://jonathanhult.com

Similar Messages

  • FDM event scripts firing twice during data loads

    Here's an interesting one. I have added the following to three different event scripts (one at a time, ensuring only one of these exists at any one time), to clear data before loading to Essbase:
    Event Script content:
    ' Declare local variables
    Dim objShell
    Dim strCMD
    ' Call MaxL script to run data clear calculation.
    Set objShell = CreateObject("WScript.Shell")
    strCMD = "D:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin\startMAXL.cmd D:\Test.mxl"
    API.DataWindow.Utilities.mShellAndWait strCMD, 0
    MaxL Script:
    login ******* identified by ******* on *******;
    execute calculation 'FIX("Member1","Member2") CLEARDATA "Member3"; ENDFIX' on *******.*******;
    exit;
    However, it appears that the clear is carried out twice, both before and after the data has been loaded to Essbase. This has been verified at each step by checking the Essbase application log:
    No event script:
    - No Essbase data clear in application log
    Adding above to "BefExportToDat" event script:
    - Script is executed once after clicking on Export in FDM Web Client (before the "Target System Load" modal popup is displayed). Entries are visible in Essbase Application log.
    - Script is then executed a second time when clicking on the OK button in the "Target System Load" modal popup. Entries are visible in Essbase Application log.
    Adding above to "AftExportToDat" event script:
    - Script is executed once after clicking on Export in FDM Web Client (before the "Target System Load" modal popup is displayed). Entries are visible in Essbase Application log.
    - Script is then executed a second time when clicking on the OK button in the "Target System Load" modal popup. Entries are visible in Essbase Application log.
    Adding above to "BefLoad" event script:
    - Script is NOT executed after clicking on Export in FDM Web Client (before the "Target System Load" modal popup is displayed).
    - Script is executed AFTER the data load to Essbase when clicking on the OK button in the "Target System Load" modal popup. Entries are visible in Essbase Application log.
    Some notes on the above:
    1. "BefExportToDat" and "AftExportToDat" are both executed twice, before and after the "Target System Load" modal popup. :-(
    2. "BefLoad" is executed AFTER the data is loaded to Essbase! :-( :-(
    Does anyone please have any idea how we might execute an Essbase database clear before loading data, and not after we have loaded fresh data? And perhaps on why the above event scripts appear to be firing twice?! There does not appear to be any logic to this!
    BefExportToDat - Essbase Application Log entries:
    +[Wed May 16 16:19:51 2012]Local/Monthly/Monthly/admin@Native Directory/140095859451648/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:19:51 2012]Local/Monthly/Monthly/admin@Native Directory/140095859451648/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:19:51 2012]Local/Monthly/Monthly/admin@Native Directory/140095859451648/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    +...+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1003037)+
    Data Load Updated [98] cells
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1003024)+
    Data Load Elapsed Time : [0.52] seconds
    +...+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:20:12 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    AftExportToDat - Essbase Application Log entries:
    +[Wed May 16 16:21:32 2012]Local/Monthly/Monthly/admin@Native Directory/140095933069056/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:32 2012]Local/Monthly/Monthly/admin@Native Directory/140095933069056/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:32 2012]Local/Monthly/Monthly/admin@Native Directory/140095933069056/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    +...+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1003037)+
    Data Load Updated [98] cells
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095930963712/Info(1003024)+
    Data Load Elapsed Time : [0.52] seconds
    +...+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095928858368/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095928858368/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:21:47 2012]Local/Monthly/Monthly/admin@Native Directory/140095928858368/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    BefLoad - Essbase Application Log entries:
    +[Wed May 16 16:23:43 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:43 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:43 2012]Local/Monthly/Monthly/admin@Native Directory/140095932016384/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+
    +...+
    +[Wed May 16 16:23:44 2012]Local/Monthly/Monthly/admin@Native Directory/140095929911040/Info(1003037)+
    Data Load Updated [98] cells
    +[Wed May 16 16:23:44 2012]Local/Monthly/Monthly/admin@Native Directory/140095929911040/Info(1003024)+
    Data Load Elapsed Time : [0.52] seconds
    +...+
    +[Wed May 16 16:23:45 2012]Local/Monthly/Monthly/admin@Native Directory/140095860504320/Info(1013091)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:45 2012]Local/Monthly/Monthly/admin@Native Directory/140095860504320/Info(1013162)+
    +Received Command [Calculate] from user [admin@Native Directory]+
    +[Wed May 16 16:23:45 2012]Local/Monthly/Monthly/admin@Native Directory/140095860504320/Info(1012555)+
    +Clearing data from [Member3] partition with fixed members [Period(Member1); Scenario(Member2)]+

    Hi Larry,
    As mentioned, our exports do not appear to be generating the "-B.Dat" and "-C.Dat" files at present. However, you are correct with the Export and Load event scripts firing twice (once for the main TB file and again for the journal file). Does this also mean it could continue to fire an additional two times for the "-B.Dat" and "-C.Dat" files?
    On the last run, the output was as follows with the modified scripts:
    After clicking on Export in Workflow, the Target System Load modal popup is displayed, and the first two files have been generated:
    14.24.15.0527_BefExportToDat.txt
    14.24.17.0617_AftExportToDat.txt
    After clicking on OK in the Target System Load modal popup, the actual load to Essbase takes place. A further six files are generated:
    14.24.21.0289_BefLoad.txt
    14.24.22.0117_AftLoad.txt
    *14.24.22.0152_BefExportToDat-A.txt*
    *14.24.22.0414_AftExportToDat-A.txt*
    *14.24.22.0433_BefLoad-A.txt*
    *14.24.22.0652_AftLoad-A.txt*
    This makes a lot more sense, since one can see that the event scripts are being run a second time against the journal files during the data load. Many thanks, this solves my problem as I can now place my script where I want in the process chain. It's just a shame that there are not separate event scripts to distinguish between the various .Dat exports/loads, which are clearly occuring at separate times in the process chain.
    Many thanks! :-)
    P.S. Updated script below if anyone wishes to use it:
    Sub BefExportToDat(strLoc, strCat, strPer, strTCat, strTPer, strFile)
    Dim strF, fso, tf, t, temp, m, miliseconds, strSuf
    t = Timer
    temp = Int(t)
    m = Int((t-temp)*1000)
    miliseconds = String(4 - Len(m), "0") & m
    strF = "D:\TEST\" & Replace(Time, ":", ".") & "." & miliseconds & "_BefExportToDat"
    strSuf = UCase(Left(Right(strFile,6),2))
    If strSuf = "-A" Or strSuf = "-B" Or strSuf = "-C" Then
    strF = strF & UCase(strSuf) & ".txt"
    Else
    strF = strF & ".txt"
    End If
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set tf = fso.CreateTextFile(strF, True)
    tf.WriteLine(strFile)
    tf.Close
    Set fso = Nothing
    End Sub

  • How to get uploaded file name and path in BefExportToDat event script

    I would like to get hold of the uploaded file name and full path in the event script "BefExportToDat", as I need to extract values from particular fields. However I have not yet found a way to do this.
    - The input variable "strFile" returns the .Dat file path in the Outbox, to which it is about to export the data. This is no use to me.
    - The API variable RES.PstrFilename is returning nothing
    I am using RES.PstrFilename in the "BefFileImport" event script in a different FDM application and it works fine, however I need to find a way to get this to work in the "BefExportToDat" event script.
    Please let me know how this might be achieved.

    I am looking through the API calls in FDM Workbench, but cannot see the table (tPOVPartitions) you mentioned listed. Is this the correct name? And do I just use the function listed in the object browser to run the query?
    Furthermore (going back to my initial thoughts of using strFile), it appears that although the variable contains the .Dat filename and path, the actual file is non-existent when "BefExportToDat" is executed:
    Error:
    Error: Export failed.
    Detail: File not found.
    This would make sense, but it does make the variable "strFile" a little pointless since one cannot make use of the file in this particular event script. Do you please have any thoughts on this?

  • Error trying to display a report file in FDM event script

    Hi
    I am trying to display a file (report) during an event script and receive an error "Object reference not set to an instance of an object" . The process works in version 9.3 but is generating this error during our upgrade testing on 11.1.2.2 (different hardware)
    The file (check report) is getting written correctly the \OutBox\Log directory. The file contains a standard Check Report with a file extension .pdf ( lngFileType = 31)
    We have no issues creating the file
    We try to display the file on the screen for the user using the following code which fails with the "Object reference not set to an instance of an object" error and also a message "Could not load XML file:" with the file name and path
    'Open report file in web client
    RES.PlngActionType = 4
    RES.PstrActionValue = strFileName
    Symptoms:
    We can open the same file as text with RES.PlngActionType = 1
    Everyone has rights to open/read a file in the directory
    File can be opened manually and appears correct
    Any help would be appreciated. I have not found similar issues on the forum. Support has offered no suggestions to date

    Hi and thanks for your response.
    Yes, we have tried all the various type of files ( ScriptActionTypes). The Type = 1 will open the file, but as a text stream without formatting, etc. If we try type = 3 we receive a different error message:
    Error: Invalid Report ID: 0
    Detail: Stacktrace:
    upsAppServerDM._clsAppServerDM.fPublishReport(lngReportID[Int32], lngPubFileType[Int32], strReportSQL[String], strSubReportSQL[String])
    Hyperion.FDM.Pages.ViewReportActionEvent.ExecuteReport(reportID[Int32], sqlStatement[String])
    Hyperion.FDM.Pages.ViewReportActionEvent.PreviewReport()
    Also, the Validation Report is enabled (we are using check with warnings - ID133), I have tried changing the default Web Settings from .PDF to .html and back again and tried the various other default options available under Web Settings.
    If we create a simple test text file, we can open the file as text (Type = 1)
    Here is the complete error message employing Type = 4 (XML)
    Error: Object reference not set to an instance of an object.
    Detail: Stacktrace:
    Hyperion.FDM.Pages.IntersectionSummaryCheck.FillTitleRow()
    Hyperion.FDM.Pages.IntersectionSummaryCheck.Page_Load(sender[Object], e[EventArgs])
    System.Web.UI.Control.OnLoad(e[EventArgs])
    Hyperion.FDM.Pages.BasePage.OnLoad(e[EventArgs])

  • How to write ABAP Workflow test script

    Hi
    Please any body tell me what is the workflow test script. And how to write. Please if any body have the documentation please share wd me

    For some reason I think the test script will depend on the workflow build, maybe because a test script is scenario specific? So if you need to create a test script for a workflow, you will need to analyze the documentation created for the workflow and maybe the workflow itself. Then you can create a script. If you don't know how to create a test script I think you will need to check a different forum.
    Regards,
    Martin

  • Workflow event got deactivated?

    Hi all,
    I have created an workflow for Notification (IW21). When i create a notification the workflow event is getting deactivated and i am getting an error message "Workflow definition of task 'WS11111111' cannot be activated".
    Can anyone please help me.
    Regards,
    Gautham

    Hi Gautham,
    Check the workflow which you are using if it is active. Could you give the workflow number (unless it is a custom built one) because WS11111111 doesn't exist in the system I have access to.
    The event linkage gets deactivated because there is an error in the linkage or as in your case the workflow. The option "Behavior upon feedback" determines the behavior of the event linkage when an error occurs. In your case the event linkage gets deactivated. This has nothing to do with the error itself.
    Regards,
    Martin

  • WorkFlow event

    hello everybody ...
    Please help me as to how to create a workflow event and how to trigger it when my me21n transaction is completed.
    what are the steps involved..
    Please need this quite urgently.....

    Why use SAP Workflow?
    SAP Workflow ensures " the right work is brought in the right sequence at the right time to the right people". It is a tool designed to facilitate and automate business processes that require tasks to be performed by people. Ideal for casual or non-SAP users, since all the work items can be performed outside of SAP by simply responding to an email, SAP workflow can be linked to Microsoft Outlook or Lotus Notes. Each step of a business transaction can be easily monitored and processes are completed from the beginning to the end. Workflow allows process owners to keep an eye on deadlines, provides statistics on the length of time to complete work processes, determine the workload with regard to individual employees and save processing time.
    Since Workflow delivers work items to employees automatically via email, they do not have to wait or inquire about the status of a particular transaction. SAP Business Workflow can also be used to respond to errors and exceptions - it can start when predefined events occur. For example, an event can be triggered if particular errors are found during an automatic check of the data SAP workflow is particularly useful when there is a business process involving more than one person, when an automatic notification can replace a manual communication and when there is a defined set of individuals and/or documents implicated. It organizes one's work, alerts users and directs traffic by sending work items - once the user executes the work item, then another one can be sent to another user. For example, a Manager could use workflow to approve a vacation request from an employee. The workflow application would ensure that each person involved uses the correct online form and successfully completes their step before the planned leave was entered into SAP - either by an Administrator or automatically. By the same token, if someone registers for a training class, Workflow can act as an alert tool by notifying the supervisor in question or reminding the individual of an upcoming class.
    Before implementing SAP Business Workflow, organizations should start by asking a series of questions, such as: - Which HR processes do we want to automate? - To what extent can we change current procedures and pass them over to electronic control? - What steps are these procedures made up of? - Who are the individuals involved and what are their roles? - How do we get the Workitem to go to the right people?
    Even though Workflow can be implemented via user-defined tables without the Organizational Management component in place, having a pre-defined organizational structure adds tremendous value and saves time. A clear reporting structure made up of positions and position holders that is maintained by the HR department, ensures the ongoing ease-of-maintenance effort. The ability of HR personnel to add and delete users from positions as people come and go, without affecting your core workflows, is a tremendous long-term benefit. If you have Personnel Administration in place, employee's email addresses can also be maintained by the HR department in addition to employee's respective Time/HR and Payroll administrators who might be involved in the Workflow.
    There are basically three options for connecting workflow to external email: Microsoft Outlook/Exchange, Lotus Notes or SAP Connect and Internet Mail. A key factor in SAP R/3 4.6 implementations and upgrades will be the use of a Web browser as the main workflow interface.
    Benefits of SAP Workflow
    Although the advantages gained by using workflow are not of financial nature, the time saved by optimizing processes could easily be translated into money. - The quality of your processes will be assured by sending relevant information directly to the user. Managers don't have the time to search for information. For example if an employee obtains a qualification as a result of hard work or training, their Managers can be notified immediately. - Cycle time is reduced by providing all the necessary information needed: people can check their list of pending tasks and determine which tasks can be completed the next day without any negative impact. I.e. A Payroll Administrator might be notified immediately of an employee address change via ESS that might implicate taxes. - Workflow allows to monitor deadlines.
    It could be used to remind employees of upcoming performance reviews or training or to send payroll year-end tasks items to the relevant Payroll Administrators. Deadline handing ensures that users perform the tasks within the time planned. Escalation measures ensure that the failure to meet a deadline can be corrected by other means. - Users can see at a glance how the process works and who will be selected to perform the different tasks, which creates a transparent work environment. - SAP contains Workflow templates, which can be used as a reference providing more than 200 Workflow samples. - Implementing Workflow will save costs. Ask yourself how much time is spent gathering information, getting hold of people, logging into different systems and trying to understand who to give a task to? How often does this current process fail and how labor intensive is it to fix it? Workflow reduces time and effort spent and the savings in days can be considerable.
    How does it work?
    There are several components of a workflow: Workflow Definition, Work Items, Triggering Events and at the Receiving end the Organizational Structure. The workflow definition is created in the Workflow builder and is made up of the various steps. Each step of the workflow definition can be a task pointing to a SAP transaction or a decision. A decision might contain specifications about agents and deadline monitoring for a step. The workflow is started either manually or by the system at runtime. For the system to start a workflow, the workflow definition must contain a triggering event (for example the event "Address update by the employee"). When the event occurs, the relevant workflow is started automatically. Tasks or Work items describe the activities involved and can refer to automatically executable methods (i.e. send an email to a supervisor) or they might need a user to execute them (i.e. supervisor has to go and click on a button in his workplace to approve something). Tasks refer to business objects, which are ABAP coding. Events are activities that trigger the workflow - one or several workflows at the time. Once the workflow is triggered, the definition flowchart determines when and in what order work happens. Work items are then received and executed in MS Outlook, Lotus Notes, mySAP Workflow MiniApp or the SAP integrated inbox. Alternatively, the workflow system can transmit e-mail notifications directly to any mail system, informing the user of the need to log in to the SAP system to execute the task. A work item is always assigned to one or more users. Once the task is executed, the work item vanishes from the other users' inboxes.
    Integration to Email systems
    Usually executable work items are received in the Workflow inbox. But casual SAP users, especially Managers might forget to check their inbox at a regular basis and so it makes sense to set up reminder emails, informing people via a batch job that they have work items in their inbox. Alternatively, an email can be sent directly to their Lotus Notes / Outlook account with a hotlink to the Workflow inbox. All emails, whether they exists in the form of Workflow notifications, Workflow Workitems, or just a standard SAP Office memo, are sent out of SAP through SAPConnect. This provides the all in one gateway between SAP and the mail server. The transport of workflow items between SAPConnect and the mail server (whether that's Lotus Notes or Microsoft Outlook) has been facilitated by SAP provided add-ons that are fully optimized for the different protocols required for each server. Lotus Notes, for example, uses a 'pipe' called the MTA, or Message Transfer Agent. This was designed jointly between SAP and Lotus to provide full integration between the two systems.
    It should be noted that the type of transport medium used is dependent on the mail server and not the mail client. In other words, if the employee uses Outlook on their computer but the mail server is a Lotus Domino server, the MTA would be the mail gateway used. Each workflow background user must have an email address stored in their user profile. It is note worthy that no approval or reply notification will be allowed from an external mail system - in other words external email systems cannot respond back to SAP for security reasons.
    Looking ahead…
    Workflow is becoming more and more web-oriented which allows external business partners to receive notifications. Companies can adopt Workflow together with "Webflow" where workflows can be initiated via Internet transactions and where different external business partners can receive notifications sent by the workflow. The Web inbox offers access to partner companies logging on to your Web portal and it refreshes itself automatically. Any type of work item can be executed directly from a centralized list of work items, no matter what graphical user interface is needed to run it. Webflow is particularly useful when a company deals with outside partners using different software platforms.
    Workflows can make an ERP system more efficient by automating situations in which work processes have to be run through repeatedly, or situations in which the business process requires the involvement of a large number of agents in a specific sequence. It is essential that the Workflow consultant is an expert in ABAP development or has access to ABAP programmers since a good deal of the work is technical. You will also need someone familiar with Lotus Notes / Outlook concepts and development in order to create the interfaces between the systems. The Workflow consultant should also have experience in installing and integrating efficient electronic archive systems.
    regards..
    Abhay
    rewards point if helpful

  • Workflow event invoke FM

    Hi,
    my requirement is when a inquiry created then workflow event will trigger in BUS2030 at that time i need to invoke my FM using the Inquiry doc No:.
    How can i pass the Inquiry details from workflow to my custom FM?
    its urgent.............
    thanks in advance
    Giri

    Hi,
    you just have to find the correct workitem id.
    Try the id of the steps and the id of the workflow in the sap_wapi function modules.
    In the workflow log you can find out the exact workitem id numbers.
    Kind regards, Rob Dielemans

  • Std Workflow events for HR Scenarios

    Hi I am looking for standard workflows for the following scenarios. Can someone tell me if there are any standard workflow events or should I go for creating a new WF event.
    1.Legal Name change---Is there a Wf that triggers some notification.
    2.Hire Action in SAP--Is there a Wf that triggers some notification to HR team and Dept mgr.
    3.Hire Action in SAP--Is there a Wf that triggers some notification to HR team and Dept mgr.
    4.Leave of Absence--Sap notifying HR team.
    5.Initial change(IT 105)--Payroll Admin sends notification to associate as well as security team.
    6.Marital Status Change.
    7.Termination(Voluntary and Involuntary)--Notification to Security team.
    8.Probation--Sap reminds the HR team that date is due for employee to return.
    I was thinking that for every scenario we have to create a new wf event. I may be wrong but is there a standard wf for the above.
    Thanks in advance.

    There are std. workflows for this, but it will depend upon your configuration. You can trace whether a workflow is getting triggered from txn: SWEL.
    The better option is to use the MAIL feature of dynamic actions. Here's the process:
    Enter the name of the feature which defines the characteristics of the mail.
    Example
    Infotype  Field  .....  Ind.    Var.function part
    0001     SACHP         M       M0001
    A mail is sent when the field SACHP is changed. The characteristics of the mail are defined in feature M0001.
    In the standard system, feature M0001 is provided as a model. The documentation on feature M0001 explains how to define the characteristics of a mail.
    Thanks
    Sankhadip
    <b>Reminder: Points should be awarded on answers</b>

  • Where to include custo object types in workflow events?

    Hi All,
    One of my friend is working on HR related Workflow. He has a question about where to include the custom change document infotypes in workflow events.
    To make it clear, he says there are three transactions swehr1, swehr2 and swehr3. Now, if he wants to include a custom object (Z object) which transaction should he use?
    Please reply ASAP.
    Regards
    Swapna.

    Yes, you use swehr1 to link the infotype to the object type. Then use swehr3 to create the event linkage to your function module or object type event.
    I just did this with an e-recruiting project and it worked fine.  For example:
    swehr1 entry:
    NB  Requisition     5131  Persons Responsible    ZERC_REQUI     Job Requisition
    swehr3 entry:
    NB  Requisition     5131  Persons Responsible   INS     0     ZERC_REQUI             Z_ON_MEMBER_ADD
    This accomplishes the following: when a record is inserted for infotype 5131, the function module Z_ON_MEMBER_ADD runs. That function module decides if or which event should be raised. Alternatively I could have entered an event for the ZERC_REQUI object type, but then the event will always be raised on a 5131 record insertion, and for my application I didn't want that.
    I hope this example is helpful.
    ~Margaret

  • How to download and upload selected subscriptions in workflow events

    Hi,
    I have a workflow event that has 6 subscriptions. I would like to download only 2 subscriptions for that event and upload in to anothet instance.
    Thanks,
    HC

    This is too vague a question, please be more specific. What protocol would you like to use? HTTP? FTP? Something else?

  • Problems with close event scripts and closing Photoshop

    Hi!
    We are having problems with close event scripts ("Cls ") when closing/quitting Photoshop.
    The close event scripts are working without problem when closing an image. But when quitting Photoshop without having closed all images we are observing the following behaviour:
    with CS2 the close event scripts are not triggered at all
    with CS4  the close event scripts are triggered and executed correctly. But after that the Photshop process freezes. No visible GUI, you have to kill the process with the task manager.
    I can reproduce this behaviour even with a small script consisting of a single alert('hello') and even an empty script. Is this an known bug or am I doing something wrong?
    Thanks for your help!
      Eric

    Check your energy saver settings under system preferences. That is where you set sleep setting.

  • Making event scripts generic between environments

    At present we have a couple of FDM event scripts which construct some MaxL statements and then execute them against the Essbase database (to clear data before loading). The problem we have is that the MaxL scripts require hard-coded usernames, passwords and servernames (to log in to ESSMSH). When migrating the scripts between environments, these scripts will have to be manually updated each time for the given environment to which they are being migrated.
    Is there a more elegant solution to this? One idea would be to have the values stored in a single plain text file (in a password-protected share) which would then be accessible by any of the various scripts in a given environment. But I would be interested to learn if there are alternatives to this.

    If you migrate environments, you are going to have to do some configuration pretty much anyway you go about it. The question is what is the easiest/most straight foward so that it doesn't get missed during a migration, IMHO.
    I would go with a well defined/documented "Global" config file that contains all of the information that may change. At a minimum, Usernames and passwords should be obfuscated/encrypted; however, it would be just as easy to do the whole file. Realize, that the decryption routines would be in your script code so this isn't 100% secure; however, it would prevent the casual user from quickly seeing usernames / passwords, etc. Furthermore, if you encrypted the whole file, they may not even realize there is a username/password in the file, etc.
    In my mind this is the way to go...
    Some other thoughts though, depending on what exactly you want to do....
    Option 2
    Username / Password / Server could be some variation on the server name so that the script always knows how to generate them. The negative side is that you would always need to create a new user / password anytime server changes, so you are still not escaping manual labor. (Though maybe you could use an API call to create it, but then you probably need a username/password to create the user... AAaaaahhhhhhhhh)
    While neat, this seems like it would suffer from James Bond syndrome. I'm going to kill you now Mr. Bond, but first I'm going to tell you all my intricate plans for world domination, put you in some ridiculous trap with an semi-obvious flaw, AND leave so that you have time to work on your escape......
    Option 3
    Make a Web Service and then have your scripts make a Web Call (i.e. http://www.mycompany.com/GetConfigInfo.asp?secretcode=12341234123) which would return all the info you need. (username, password, servers, etc). AS LONG AS the webservice machine doesn't move around, this might be a decent way of doing it. Anyone sniffing around the local machines would find the config info; however, anyone looking at the scripts would see the call and could just open it in a web browser. You could of course secure that by looking at the source of the request and if it's not an approved server, not return the requested info; however, now you are getting into more maintenance work........
    The time spent making this and potentially maintaining it probably isn't worth it.

  • Configuring and programming Workflow Events

    Hi,
    Please, I´m trying understand how to program workflow events.
    After I´d configured the DAD, I´d configured the Global preferences to point the Web agent to http://dad address/wf/owa.
    So now I want to program an event that starts a process at the workflow databases every time that an insert occurs at another database, but I don´t know how to configure the other SYSTEM and I don´t have any example of event.
    If someone could help me I´ll be glad.
    Tks,
    Raquel

    Hi,
    Please check out the section Overview of the Workflow Business Event System to understand and create event/subscriptions. There is a seeded event system demonstration which may help you as well.
    Cheers,
    Raja

  • Photoshop sometimes freezes after on close ('Cls ') event script

    Hi!
    We are working on integrating Photoshop with a content management system. For this we are using a synchronisation file. The cms writes the filepath of pictures to be edited to the sync file. Photoshop writes a modified flag to the sync file and/or a closed flag after work is done. This is implemented by an on save ('save') and an on close ('Cls ') event script.
    The scripts are doing fine and the whole system is working. Now our problem: Sometimes (every 50 or 100 pictures) Photshop hangs up after closing a picture.
    As far as we can conclude from the sync file and log file the close event script did complete its work without problem in such a case. But after that Photoshop freezes with doing 50% CPU load.
    Has anyone an idea what we could be doing wrong? May it have to do with the file access of our scripts (sync file and log file)? Is there any common mistake with scripting that results in the described behaviour? Is this even a problem of our scripts?
    For everyone interested I attached the scripts copied together to a single text file.
    Thanks for your help,
      Eric

    Beolw the complete source code. Attached file in my first posting seems not to be working ("QUEUED"?).
    // The only script to be called by MRS when starting to edit a photo
    // in Photoshop. The image file itself is not to be passed as
    // parameter, it is just written to the sync file.
    // (see concept document.)
    * @@@BUILDINFO@@@ MRS_start.jsx 1.0.0.1
    #target photoshop
    //@include "MRS_settings.jsx"
    //@include "MRS_eventsinit.jsx"
    //@include "MRS_open.jsx"
    //@include "MRS_logging.jsx"
    // on localized builds we pull the $$$/Strings from a .dat file, see documentation for more details
    $.localize = false;
    try {
        // Install the event scripts in Photoshop
        InitializeEvents();
        // Load the selected image files
        CheckOpenFiles();
    catch( e ) {
        // always wrap your script with try/catch blocks so you don't stop production
        // remove comments below to see error for debugging
        Log(e);
        alert("Fehler in der MRS Anbindung: " + e);
    =======================================================================================================
    //  Install all event scripts required by the MRS Photoshop integration
    * @@@BUILDINFO@@@ MRS_eventsinit.jsx 1.0.0.1
    //@include "MRS_settings.jsx"
    // Install all event scripts required by the MRS Photoshop integration
    function InitializeEvents(){
        //Check the script files.
        var onSave = new File(MRS_SCRIPTONSAVE);
        if (! onSave.exists) {
            Log("Script file not found: " + MRS_SCRIPTONSAVE);
            alert("MRS Anbindung fehlerhaft!");       
            return false;
        var onClose = new File(MRS_SCRIPTONCLOSE);
        if (! onClose.exists) {
            Log("Script file not found: " + MRS_SCRIPTONCLOSE);
            alert("MRS Anbindung fehlerhaft!");       
            return false;
        app.notifiersEnabled = true;
        //Install the script.
        installNotifier (onSave, "save");
        installNotifier (onClose, "Cls ");
        return true;
    // Install an event script
    function installNotifier(scriptFile, eventId) {
        if(findNotifier(scriptFile, eventId) != null) {
            Log("Script already installed: " + scriptFile.fullName);
        } else {
            app.notifiers.add(eventId, scriptFile);
            Log("New script file installed: " + scriptFile.fullName);
    // Checks if an event script is already installed
    function findNotifier(scriptFile, eventId) {
        for(i=0; i<app.notifiers.length; i++) {
            var installedNotifier = app.notifiers[i];
            if (installedNotifier.eventFile.fullName.toLowerCase() == scriptFile.fullName.toLowerCase()
                && installedNotifier.event.toLowerCase() == eventId.toLowerCase()) {
                    return installedNotifier;
        return null;
    =======================================================================================================
    //@include "MRS_settings.jsx"
    * @@@BUILDINFO@@@ MRS_logging.jsx 1.0.0.1
    // Class Logger
    function Log(text) {
        var logfile = new File (MRS_LOGFILE);
        logfile.open('a');   
        try {
            var now = new Date();
            logfile.writeln(now.toLocaleString() + " | " + text);
        } finally {
            logfile.close();   
    =======================================================================================================
    * @@@BUILDINFO@@@ MRS_settings.jsx 1.0.0.1
    MRS_PICTUREPATH = '/D/Projekte/npi/project/dpa.MRS.WinUI/bin/Debug/Photoshop/pictures/';
    MRS_SCRIPTPATH = '/D/Projekte/npi/project/dpa.MRS.WinUI/bin/Debug/Photoshop/ps-script/';
    MRS_SYNCFILE ='/D/Projekte/npi/project/dpa.MRS.WinUI/bin/Debug/Photoshop/PSIntergation.txt/';
    MRS_SCRIPTONSAVE = MRS_SCRIPTPATH + 'MRS_onsave.jsx';
    MRS_SCRIPTONCLOSE = MRS_SCRIPTPATH + 'MRS_onclose.jsx';
    MRS_LOGFILE = MRS_PICTUREPATH + 'PSIntegration.log';
    =======================================================================================================
    // Event script for "save" in Photoshop.
    // Marks the saved file in the sync file as "M" (modified)
    * @@@BUILDINFO@@@ MRS_onsave.jsx 1.0.0.1
    var begDesc = "$$$/JavaScripts/MRS_onsave/Description=Benachrichtigt MRS wenn das Bild gespeichert wurde." // endDesc
    var begName = "$$$/JavaScripts/MRS_onsave/MenuName=MRS OnSave" // endName
    // on localized builds we pull the $$$/Strings from a .dat file, see documentation for more details
    $.localize = false;
    //@include "MRS_settings.jsx"
    //@include "MRS_syncfile.jsx"
    //@include "MRS_logging.jsx"
    Log("OnSave triggered.");
    try {
        var savedFile = GetDataFromDocument (app.activeDocument);
        var pssyncer = new PSSyncer();
        var photo = pssyncer.GetFileInfo(savedFile.fileName);
        if (photo != null) {
            photo.SetModified();
            pssyncer.Flush();
    }  catch( e ) {
        Log(e);
        alert("Fehler in der MRS Anbindung: " + e);
    // Extracts the file name from Photoshop Document class.
    function GetDataFromDocument( inDocument ) {
        var data = new Object();
        var fullPathStr = inDocument.fullName.toString();
        var lastDot = fullPathStr.lastIndexOf( "." );
        var lastSlash = fullPathStr.lastIndexOf( "/" );
        data.extension = fullPathStr.substr( lastDot + 1, fullPathStr.length );
        data.folder = fullPathStr.substr( 0, lastSlash );
        data.fileName = fullPathStr.substr( lastSlash+1, fullPathStr.length );
        return data;
    =======================================================================================================
    // Event script for "close" in Photoshop.
    // Marks the saved file in the sync file as "M" (modified)
    * @@@BUILDINFO@@@ MRS_onclose.jsx 1.0.0.1
    // on localized builds we pull the $$$/Strings from a .dat file, see documentation for more details
    $.localize = false;
    //@include "MRS_settings.jsx"
    //@include "MRS_syncfile.jsx"
    //@include "MRS_logging.jsx"
    //@include "MRS_tools.jsx"
    Log("OnClose triggered.");
    try {
        var saved = SavedWhileClosing(arguments);
        var pssyncer = new PSSyncer();   
        for(var i=0; i<pssyncer.GetFileInfoList().length; i++) {
            var photo = pssyncer.GetFileInfoList()[i];
            if(photo.WorkInProgress() && !IsDocumentOpened(photo.GetFileName())) {
                if (saved) {
                    photo.SetModified();
                photo.SetClosed();
        pssyncer.Flush();
    }  catch( e ) {
        Log(e);
        alert("Fehler in der MRS Anbindung: " + e);
    // Checks if picture has been saved while closing it. (yes/no dialog on close)
    function SavedWhileClosing(myArguments) {
        var usingKeyCopy = false;
        var actionDescripto = null;
        var actionDescriptor = myArguments[0];
        if ( actionDescriptor != null && "ActionDescriptor" == actionDescriptor.typename ) {
            if (actionDescriptor.hasKey(stringIDToTypeID("saving"))) {
                return actionDescriptor.getEnumerationValue(stringIDToTypeID("saving")) == stringIDToTypeID("yes");
        return false;
        var actionDescriptor = myArguments[0];
        var s = "";
        if ( actionDescriptor != null ) {
            if ( "ActionDescriptor" == actionDescriptor.typename ) {
                alert(actionDescriptor.count);
                for(i=0; i<actionDescriptor.count; i++) {
                    s += actionDescriptor.getKey(i) + " | ";
                    s += typeIDToStringID(actionDescriptor.getKey(i)) + " | ";
                    s += actionDescriptor.getType(actionDescriptor.getKey(i))+ "\r\n";
        alert(s);
        //alert("1: " + actionDescriptor.getObjectValue(stringIDToTypeID("as")));
        //alert("2: " + actionDescriptor.getObjectValue(stringIDToTypeID("in")));
        //alert("3: " + actionDescriptor.getEnumerationType(stringIDToTypeID("saving")));
        alert("3-a: " + typeIDToStringID(actionDescriptor.getEnumerationType(stringIDToTypeID("saving"))));
        alert("3-b: " + typeIDToStringID(actionDescriptor.getEnumerationValue(stringIDToTypeID("saving"))));
    =======================================================================================================
    // Script used to open the files selected in MRS and written to
    // the sync file.
    @@@BUILDINFO@@@ MRS_open.jsx 1.0.0.1
    //@include "MRS_settings.jsx"
    //@include "MRS_syncfile.jsx"
    //@include "MRS_tools.jsx"
    // Opens all image files marked in the sync file as "S" (start work).
    function CheckOpenFiles(){
        var pssyncer = new PSSyncer();
        for(var i=0; i<pssyncer.GetFileInfoList().length; i++) {
            var syncfile = pssyncer.GetFileInfoList()[i];
            if (syncfile.StartWork()) {
                //open the image file if in state "S" (start work)
                OpenFile(syncfile.GetFileName());
                //switch state to "W" (work in progress)
                syncfile.SetWorkInProgress();
                pssyncer.Flush();
            } else if (syncfile.WorkInProgress()) {
                if (!IsDocumentOpened(syncfile.GetFileName())) {
                    //File was marked as "W" (work in progress).
                    //-> Possibly Photoshop crashed. So just re-open the file and
                    //don't chnge state.
                    OpenFile(syncfile.GetFileName());
    =======================================================================================================
    // Some tool functions...
    * @@@BUILDINFO@@@ MRS_tools.jsx 1.0.0.1
    //@include "MRS_settings.jsx"
    // Checks if the document is currently opened in Photoshop.
    function IsDocumentOpened(fileName) {
        var fullFileName = MRS_PICTUREPATH + fileName;
        fullFileName = fullFileName.toLowerCase();
        for (i = 0; i < app.documents.length; i++) {
            if (app.documents[i].fullName.fullName.toLowerCase() == fullFileName) {
                return true;
        return false;
    // Opens an image file in Photoshop
    function OpenFile(fileName) {
        var syncfile = new File(MRS_PICTUREPATH + fileName);
        if (syncfile.exists) {
            app.open(syncfile);
    =======================================================================================================
    =======================================================================================================

Maybe you are looking for

  • Time out problem

    Hi, I am executing one method in my Struts Action class which is making me timeout. but i can not increase the session time . I am considering some below points to discuss. 1. when i clicked the submit button , i want to transfer my control to one mo

  • Balance in Transaction currency while doing MIGO

    While doing MIGO, getting the error '' Balance in Transaction Currency'' and showing the total of Excise and Cess amounts. Urgent issue. Appreciate if you could respond asap thanks Sridevi

  • Restoring an external hard drive with time machine

    I'm having a problem restoring an external hard drive using time machine. I'm on a macbook Air Running 10.7.5. The external hard drive where I store all my photos crashed a few days ago. Not a total disaster, because it's backed up, but I can't figur

  • Cannot add a partition to my hard drive

    Hey everyone, first post here. I've searched in a lot of places, and I can't find the proper answer for this. I have two partitions currently - Macintosh HD and BootCamp. I have Windows 7 set up on the other partition. It's a 120GB MacBook hard drive

  • Mapping: Problem with Namespaces while testing

    Hello, can anyone tell me what's the thing with the namespace in xml-messages for testing? My problem is the following: I have exported a test-xml-file from a mapping in another namespace (where everything is correct) and now i want to import this xm