This discussion is archived
6 Replies Latest reply: Oct 31, 2012 2:01 AM by 971633 RSS

FDM Automation script-FDM API-floadandprocess

767695 Newbie
Currently Being Moderated
Hi,


I am trying to automate FDM process using a batch script. We have a location with integration script on import format.
API for import process is

fLoadAndProcessFile
WebLink (Main) Objects 8.3 (upsWObjectsDM.dll) clsImpProcessMgr
Description:
Main (Single Period) import and calculate process. This rountine sequences and executes the required subprocesses
of the import process. The sub-processes that executed are: 1)Clear Data, 2)Execute Load [Text, Excel,
        or Integration], 3)Process Logic, 4)Process Maps, 5)Set Process Status

Parameter(s):
ByVal strFilename As String, ByVal strLoc As String, ByVal strCat As String, ByVal strPer As String, Optional ByVal
blnMerge As Boolean strFilename Full path to file to be processed (Valid File Types: Text, Excel, Null if using Data Integration)

strLoc Name of the Location to process (See Property: clsPOVMgr.PPOVLocation)
strCat Name of the Category to process (See Property: clsPOVMgr.PPOVCategory)
strPer Name of the Period to process (See Property: clsPOVMgr.PPOVPeriod)
blnMerge Optional Flag to indicate that data should be appended/merged with existing data for the POV

Return Type:

Boolean


Since we have a integration script on that location I am passing Null in the strFilename field but I am getting error like it is not a option to pass Null.


I am looking for some help.


Thanks
  • 1. Re: FDM Automation script-FDM API-floadandprocess
    tonyscalese Oracle ACE
    Currently Being Moderated
    Are you using the batch loader or are you trying to create a custom solution with the API?
  • 2. Re: FDM Automation script-FDM API-floadandprocess
    767695 Newbie
    Currently Being Moderated
    yes
  • 3. Re: FDM Automation script-FDM API-floadandprocess
    767695 Newbie
    Currently Being Moderated
    I am trying use custom script.
  • 4. Re: FDM Automation script-FDM API-floadandprocess
    755115 Newbie
    Currently Being Moderated
    Hi Tony

    I use Custom Script to automate from Validate to Export/Load only. File Import still go by click Import Fish, I made function call to Validate/Export/Load in AftImportScript.

    I did run well from FDM Client, automate script is running fine. Only when run by clicking Import fish from FDM Web Client, then report Automation Error. The following is my automation script code. Do you have any idea regarding this error?

    Regards

    David Wang


    =============== Validate , Export, Load ================================
    If API.ValidationMgr.fValidate(RES.PstrLoc, RES.PstrCat, RES.PstrPer, RES.PstrPer, False, False) Then
    '     MsgBox "Validateion Successful!",vbExclamation,"WebLink API"
         fsoWrite.writeline "Validation Successful! "
    Else
         strErrors = "Validation Error Found!" & vbCrLf
         strErrors = strErrors & "Invalid Item Count: " & CStr(API.ValidationMgr.PErr)
    '     MsgBox strErrors, vbCritical, "WebLink API"
         fsoWrite.writeline "Validation Error Found! " & "Invalid Item Count: " & CStr(API.ValidationMgr.PErr)
    End If


    Set objSR = BlOCKPROC.ActExport(RES.PstrLoc, RES.PstrCat, RES.PstrPer,RES.PstrPer, strFilePath)
         
         If objSR.blnIsErr Then
              Set objLP = Nothing
              Set objSR = Nothing
              fsoWrite.writeline "Export Failed! " & objSR.strErrDesc
    '          MsgBox "Export Failed!" & vbCrLf & objSR.strErrDesc, vbCritical,"WebLink API"
    '          Exit Sub
         Else
              fsoWrite.writeline "Export Successful!"     
         End If

         Set objLoad = BlOCKPROC.ActLoad(RES.PstrLoc, RES.PstrCat, RES.PstrPer,RES.PstrPer, strFilePath,objLP)

         If objSR.blnIsErr Then
              Set objLP = Nothing
              Set objSR = Nothing
    '          MsgBox "Load Failed!" & vbCrLf & objSR.strErrDesc, vbCritical,"WebLink API"
              fsoWrite.writeline "Load Failed! " & objSR.strErrDesc
    '          Exit Sub
         Else
              fsoWrite.writeline "Load Successful!"
         End If
  • 5. Re: FDM Automation script-FDM API-floadandprocess
    MAmmar Newbie
    Currently Being Moderated
    Hi David,

    I'm looking for the same functionality... did you figure this out?
  • 6. Re: FDM Automation script-FDM API-floadandprocess
    971633 Newbie
    Currently Being Moderated
    If using the intergration script, the value of the first parameter should be set to null, this should of type string so it follows that it will be enclosed in double quotes. i.e.


    fLoadAndProcessFile("+Null+", location, category, period, False)

    You can use the api to retrieve the location, category and period for the active application.

    Hope this helps.

    Regards,
    Peer Presha

    Edited by: 968630 on 31-Oct-2012 02:00

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points