Using BatchDriver java API we can upload multiple files into the EPM workpsace.
Here are the details ...
1. Navigate to C:\Oracle\Middleware\EPMSystem11R1\products\biplus\SDK\samples\java
Open BatchDriver.java file in text editor and comment (use //) below line
System.err.println("args: " + args.length);
Note: System.err.println("args: " + args.length); line commented in BatchDriver.java file in order to prevent error message display in workspace
2. Navigate to C:\Oracle\Middleware\user_projects\epmsystem1\bin\ReportingAnalysis\SDK
Execute jc.bat with BatchDriver.java as input
>jc.bat BatchDriver.java
Above command will create BatchDriver.class file at below location
C:\Oracle\Middleware\user_projects\epmsystem1\ReportingAnalysis\SDK\classes
3. Create a Control file which will have control statements to upload the file into workspace
Example code
Note: In the above control file each value and key were separated by symbol caret symbol ^
Explanation to the above keys used
4. Navigate to
C:\Oracle\Middleware\user_projects\epmsystem1\bin\ReportingAnalysis\SDK
Execute below command
execapi.bat BatchDriver username password servername port “<Path to batch_driver.cf>” ”<Path to .log file>”
example
execapi.bat BatchDriver admin Admin123 localhost 6800 D:\batch_driver.cf D:\batch_driver.log
Output looks like below
C:\Oracle\Middleware\user_projects\epmsystem1\bin\ReportingAnalysis\SDK>execapi.bat BatchDriver admin Admin123 localhost 6800 D:\batch_driver.cf D:\batch_driver.log
class Loaded: BatchDriver
1 token name=filename
2 token path=/Sample Content
3 token file=D:\filename.pdf
# of accessors : 0
5. filename.pdf should be uploaded into Workspace “Sample Content” directory
Note: You can add multiple entries into batch_driver.cf to upload multiple files
Here are the details ...
1. Navigate to C:\Oracle\Middleware\EPMSystem11R1\products\biplus\SDK\samples\java
Open BatchDriver.java file in text editor and comment (use //) below line
System.err.println("args: " + args.length);
Note: System.err.println("args: " + args.length); line commented in BatchDriver.java file in order to prevent error message display in workspace
2. Navigate to C:\Oracle\Middleware\user_projects\epmsystem1\bin\ReportingAnalysis\SDK
Execute jc.bat with BatchDriver.java as input
>jc.bat BatchDriver.java
Above command will create BatchDriver.class file at below location
C:\Oracle\Middleware\user_projects\epmsystem1\ReportingAnalysis\SDK\classes
3. Create a Control file which will have control statements to upload the file into workspace
Example code
accessor id=accessor1^type=user^name=User1^sysrole=Modify
accessor id=accessor2^type=user^name=User2^sysrole=View
accessor id=accessor3^type=user^name=User3^sysrole=Full
Control
data name=filename^path=/Sample Content^file=D:\filename.pdf
^desc=Sample PDF file^perm=accessor1
data name=filename^path=/Sample Content^file=D:\filename.txt
^desc=Sample Text file^perm=accessor2
data name=filename^path=/Sample Content^file=D:\filename.ppt
^desc=Sample Presentation file^perm=accessor3
Save it with batch_driver.cf at some location (let say
D:\batch_driver.cf)
Note: In the above control file each value and key were separated by symbol caret symbol ^
Explanation to the above keys used
accessor id= This ID value used to define permission
type=whether permission defining for user or group
name=User or group name
sysrole=Permission
type View/Modify/Full Control etc
data name= filename that you want to display in the
Workspace
path=In the Workspace where you want to upload
file=Physical location of the file that you want to upload into Workspace
path=In the Workspace where you want to upload
file=Physical location of the file that you want to upload into Workspace
desc=File description
perm=Map the permission definition which was created with accessor id
perm=Map the permission definition which was created with accessor id
4. Navigate to
C:\Oracle\Middleware\user_projects\epmsystem1\bin\ReportingAnalysis\SDK
Execute below command
execapi.bat BatchDriver username password servername port “<Path to batch_driver.cf>” ”<Path to .log file>”
example
execapi.bat BatchDriver admin Admin123 localhost 6800 D:\batch_driver.cf D:\batch_driver.log
Output looks like below
C:\Oracle\Middleware\user_projects\epmsystem1\bin\ReportingAnalysis\SDK>execapi.bat BatchDriver admin Admin123 localhost 6800 D:\batch_driver.cf D:\batch_driver.log
class Loaded: BatchDriver
1 token name=filename
2 token path=/Sample Content
3 token file=D:\filename.pdf
# of accessors : 0
5. filename.pdf should be uploaded into Workspace “Sample Content” directory
Note: You can add multiple entries into batch_driver.cf to upload multiple files
No comments:
Post a Comment