SY

Hi,

We want to update automatically business publisher exports on a specific scheduled timing.

 

I have read some related articles but there is not enough explanation to how to implement it

(ex, how to customize "Script runner" ?)

Please, help me to solve this problem. I need a detailed step-by-step guidance.

Thanks for your kind advice.

by Freddy Barkhuizen
Posted on Tue, 03/08/2011 - 10:19

Good Day,

First create a new Report and set its Context to Database

Set the Output of the report to Text File

Add the following as the code:

var aOutput = Context.createOutputObject();

aOutput.Init();

var sServerAddress = Context.getProperty("ServerAddress");
var sExportName = Context.getProperty("ExportName");

if(sServerAddress==null){
    aOutput.OutputLn("ServerAddress not defined" ,"Tahoma",18,0,-1,1,0);
}

if(sExportName==null){
    aOutput.OutputLn("ExportName not defined" ,"Tahoma",18,0,-1,1,0);
}

if(sServerAddress!=null && sExportName!=null){
 
    var oBusinessPublisher=Context.getComponent("BusinessPublisher");
    oBusinessPublisher.activateExport(sServerAddress, sExportName, false);

    var aResult = oBusinessPublisher.updateExport(ArisData.getActiveDatabase(), sServerAddress, sExportName);
    
    oBusinessPublisher.activateExport(sServerAddress, sExportName, true);
    
    aOutput.OutputLn("Duration=" + aResult.getDuration() ,"Tahoma",18,0,-1,1,0);
    aOutput.OutputLn("Success=" + aResult.isSuccessfull() ,"Tahoma",18,0,-1,1,0);
    
    aOutput.OutputLn("ServerAddress=" + sServerAddress ,"Tahoma",18,0,-1,1,0);
    aOutput.OutputLn("ExportName=" + sExportName ,"Tahoma",18,0,-1,1,0);
}


aOutput.WriteReport();

Now you need to create a Config file to be used with scriptrunner.bat. I create the config files in the same folder where scriptrunner.bat is located. On my machine it is C:\Program Files\ARIS7.1\server.

I call my config file SR-UBP.cfg

Add the following in the config file:

#server home directory (to be changed if needed)
#example: server.home=D:/Program Files/Aris/Server
server.home=.

# ARIS server to connect to. Defaults to 'localhost'
scriptrunner.servername=localhost

# Database name to login.
scriptrunner.dbname=20100615 Development

# Username for login.
scriptrunner.username=system

# Password for login.
scriptrunner.userpassword=manager

# Methodfilter for login. Defaults to "entire method"
scriptrunner.methodfilterguid=2fee0f80-fb7f-11da-6b7e-001143d3f402

scriptrunner.dblocale=en

scriptrunner.clientkey=

scriptrunner.oemprofile=oem01

scriptrunner.guilocale=en

scriptrunner.scriptid=Fred/e4bda1e0-93de-11df-0bbd-000c2987d684

# Outputformat ID, defaults to -1 (no output)
# 0 = RTF
# 2 = Text
# 3 = HTML
# 4 = MS Word
# 5 = MS Excel
# 7 = other
# 8 = XML
# 9 = PDF
# -1 = No output
scriptrunner.outputformat=2 

scriptrunner.outputfile=C:\\Temp\\Update-Business Publisher.txt 
scriptrunner.evaluationfilterguid= 

scriptrunner.scriptinput=DB 

scriptrunner.userproperty.count=2 

scriptrunner.userproperty1.key=ServerAddress 
scriptrunner.userproperty1.value=127.0.0.1 

scriptrunner.userproperty2.key=ExportName 
scriptrunner.userproperty2.value=Fred
You now need to modify the following properties:  
scriptrunner.dbname=# The Database name you want to connect to.

scriptrunner.username=# Username for login.

scriptrunner.userpassword=# Password for login.

scriptrunner.methodfilterguid=# Methodfilter GUID for login. Defaults to "entire method"

scriptrunner.clientkey=# The Lecense Key to use, can be a IT Architect, Business Architect, IT Designer, Business Designer Key, etc.

scriptrunner.guilocale=# Language Locale code

scriptrunner.scriptid=# The identifier of the report you created above

scriptrunner.outputfile=# The Path where you want to store the output text file(.txt) of the report, remember to use \\ instead of \

scriptrunner.userproperty1.value=# The server address, for localhost use 127.0.0.1

scriptrunner.userproperty2.value=# The Business Publisher export name

To get the the Identifier of the Report, you can right click on the Report and select Properties

Once the config file is set up, you can test it using the scriptrunner.bat in the command line

If it is working like expected you can create a task for it in the Windows Task Schedular.

Hope this helps you.

0
by Sushant P
Posted on Tue, 09/13/2011 - 07:36

In reply to by linshengquan

Hi Freddy,

I followed the above instructions to run the publisher automatically. But I observed that scriptrunner SR-UBP.cfg is running successfully but it's not generating any export file in publisher folder.

When I looked into the log files, its showing only the below information.

Duration=0

Success=false

ServerAddress=10.219.107.111

ExportName=Sushant

 

Please advice, why the database is not exported to the publisher folder. Thank you.

Regards,

Sushant

0
by Krzysztof Kaminski
Posted on Thu, 04/14/2011 - 15:42

Hi,

 

Many thanks for describing this. Works for me!!

 

Chris

0
by Tim Dossett
Posted on Thu, 06/09/2011 - 19:40

In reply to by smarty

Hi Krzysztof i am a newbie at this what should the "scriptrunner.bat" file contain to execute the "scriptrunner.cfg" file ?

0
by Kirill Tsarkov
Posted on Mon, 07/04/2011 - 11:49

Hi Freddy

Could you please help - is it possible to debug what is really goes on inside scriptrunner?
The publish script (you provided) works perfectly when it is run directly from BA. But when I try to start it from scriptrunner.bat the followning message appeares:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\gren-a-kstsarkov>cd C:\ARIS7.1_NEW\server

C:\ARIS7.1_NEW\server>scriptrunner publish.cfg
ERROR: -1
java.lang.ArrayIndexOutOfBoundsException: -1
at com.idsscheer.aris.cscommon.scriptrunner.AScriptRunnerBase.run(AScrip
tRunnerBase.java:406)
at com.idsscheer.aris.cscommon.scriptrunner.AScriptRunnerBase.run(AScrip
tRunnerBase.java:103)
at com.idsscheer.aris.server.tools.scriptrunner.AScriptRunner.main(AScri
ptRunner.java:41)

Can I get more details about the problem (debugging, log files and so on),

Thank you very much,
Kirill

0
by Freddy Barkhuizen
Posted on Mon, 07/04/2011 - 14:28

Hi Kirill,

Can you maybe send me your publish.cfg file?

Regards,

Freddy

0
by Kirill Tsarkov
Posted on Tue, 07/05/2011 - 15:43

Hi Freddy,

Actally today, when I got template from \server\templates and fill it, the task starts to work. I think that there was some junk symbol or so on in the original version of config file,  but I deleted the wrong file in my joy :).

Thank you very much and sorry for my hurry and unprepared question.  

Kirill

 

 

 

 

0
by Sushant P
Posted on Tue, 09/13/2011 - 07:33

Hi,

I followed the above instructions to run the publisher automatically. But I observed that scriptrunner SR-UBP.cfg is running successfully but it's not generating any export file in publisher folder.

When I looked into the log files, its showing only the below information.

Duration=0

Success=false

ServerAddress=10.219.107.111

ExportName=Sushant

 

Please advice, why the database is not exported to the publisher folder. Thank you.

Regards,

Sushant

0
by Jacob Zachariah
Posted on Fri, 09/16/2011 - 12:44

Hey Sushant,

 The above process does not create an export. It only updates an existing export. So you have to create the export first and then run this. I got the same issue as yours when i tried it first but got over it by creating an export.

0
by Sushant P
Posted on Mon, 09/19/2011 - 02:15

Hi Jacob,

The guidance was indeed very helpful for me.

Thank you very much.

Sushant

0
by Edmund Tan
Posted on Mon, 10/31/2011 - 21:57

Hi Freddy,

Thanks for sharing your script for the export update automation.  It's been very handy

I've noticed a strange behaviour occuring with either your script or the system executing the script(what makes this even more infuriating is that it's intermittent). 

I'm wondering if you've experienced this before?  At times when the script executes the export for some reason or other defaults to a locked status (locked vs. active).  Thus requiring manual intervention in Business Architect to allow the export to be visible in BP.

Is there a a switch or attribute that controls that behavior that you are aware of? 

I'm running the current version of ARIS and ARIS BP. 

 

Edmund

0
by Roman Joss
Posted on Fri, 01/06/2012 - 08:04

Hi there,

Just for an alternativ solution: i work with version sr 2010-08 and here is an possibility to define timebased reports (in German: Zeitgesteuerte Reporte). So you can define a time, when a specific report should be run. So i let run the report for updating the existing publisher-exports on this way. It works absolut fine.

regards,

0
by Andreas Koch
Posted on Fri, 01/06/2012 - 12:05

Hi Roman,

have you tried to use the Scheduled Report for multiple Publisher Exports?

I tried the same with ARIS 7.2 and the scheduled export only runs once but not at the scheduled time. I asked the IDS Support for help, but they told me that the report scheduled can not be user to update existing publisher exports or to generate a new one.

Until today I have no real solution to automatically update exsiting Publisher Exports.

Using the scriptrunner config file solution above I also receive this error mesage when executing the scriptrunner:

ERROR: -1

java.lang.ArrayIndexOutOfBoundsException: -1

 

Regards,

Andreas

 

0
by Andreas Koch
Posted on Tue, 01/10/2012 - 13:25

Hi,

I made it today with the report and the scriptrunner config file explained above.

The issue was, that there were some spaces at the end of the config values and so the scriptrunner could not handle the license or the db name. I corrected it using the scriptrunner config template from /server/templates and edited the values as explained.

Now I just copied the config file and changed the db name, user account and filter to use the it for more then one Publisher Export.

It is working fine for me.

Thank you very much for providing this solution.

Andreas

0
by Rik van der Schalie
Posted on Fri, 01/27/2012 - 14:42

I'm having trouble getting this to work. Now, There is a space in the name of the output file in this example, and we've got a space in the database name. Might it be necessary to enclose the database name in the SR-UBP.cfg (line 9 in the example, although the example also has a space in the database name) in quotes?

0
by Rik van der Schalie
Posted on Fri, 01/27/2012 - 16:16

Changed a few things (removed spaces from filename). Scriptrunner runs OK, but no output file.

0
by Misha Akopov
Posted on Wed, 02/15/2012 - 09:55

Hi ,

I tried to run this bat file on server , but it says

java.lang.IllegalArgumentException: hardkey contains a server key, but scriptrun

ner needs a client key!

In     scriptrunner.cfg   scriptrunner.clientkey I wrote key of designer . do I wrote somethig wrong ?

The license key is written in help->about         right ? It has format  :

scriptrunner.clientkey = XXXXX- XXXXXXXXXXXXXXXXXXXX - XXXXXXXXXXXXXX

0
by Roman Joss
Posted on Wed, 02/15/2012 - 11:15

to Andreas Koch:

Excuse my lat answer.

As Mr. Zachariah mentioned, the report can not create a publishr-export, but can update an existing export.

That works absolutely fine. IDS delivers a generic report in the report-group 'Business Publisher'. This one i enanced with export-specifica for each export i have and then i configured them with the timebased report-configuration.

Everything works fine and it's configurable from each aba-installation.



 

0
by Danilo Risme
Posted on Mon, 06/18/2012 - 16:36

 

Hi Guys,   I wanted to update automatically export business editors at a specific time set too.   But I can not implement what our friend Freddy Barkhuizen, explained in step-by-step above. When I run the command "ScriptRunner name_file.cfg" at the prompt, the following error appears: ERROR: (40171) Unable to connect to server: Server does not allow connection to your client.       Can anyone help me in resolving this error?     Thank you for your attention.
0
by Danilo Risme
Posted on Wed, 06/20/2012 - 16:45

 

Hi guys,   I managed to solve the problem described above. In "scriptrunner.servername = localhost" I put the server name instead of "localhost" and apparently solved this problem. But a new error appears:  ERROR: (40109) Your license key is invalid.     Does anyone know tell me where I find the license key?         Thanks you for your attention.
0
by Andreas Koch
Posted on Thu, 06/21/2012 - 08:40

Hi Danilo,

as valid license I used a Business Architect license string that I currently do not need for any active user.

I think the scheduled Publisher Exports should also work with a normal Designer license if the user you are using for the connection has sufficient permissions to perform the Export.

Regards,

Andreas

0
by Roman Joss
Posted on Thu, 06/21/2012 - 09:11

Hi Danilo

I'm sorry, since i don't work with scriptrunner, i do not know, which licence is needed. I don't think, it a separat licence for scriptrunner. Please contact the SAG-Support.

0
by Tarun R Nath
Posted on Thu, 08/30/2012 - 06:58

Hi Freddy,

I am not able to find the scriptrunner.bat batch file anywhere on my local, all I can find is scriptrunner.cfg file. So when it comes to the step of testing the SR-UBP.cfg file in the command prompt, it says not recongnized.

Any idea on how can I move forward ?

0
by Tarun R Nath
Posted on Thu, 08/30/2012 - 07:07

Hi Freddy

This is the list of .bat files in my entire ARIS7.1 folder directory.

0
by Danilo Risme
Posted on Fri, 08/31/2012 - 16:38

 

Hi guys,   Sorry for the delay in return I was too busy, just wanted to say thank you and let you know that I could solve my problem. I opened a call with Oracle to get the license key that was requested and is now working eprfeitamente.   Andreas Koch, Roman Joss, thank you for your support and Freddy Barkhuizen thank you for the excellent post.         Regards,   Danilo Risme.
0
by Di Smith
Posted on Fri, 10/19/2012 - 10:42

Great post!

I was able to configure daily updates for publisher export now!

The only thing I am still wondering about is: 

    Why not use Aris built in functionality of for report scheduling? Maybe I just don't know about certain disadvantages of that?

0
by Eddy Guo
Posted on Fri, 11/16/2012 - 19:47

This post works for me 100%.  Well documented and good example. Kudos!

The only config file parameter I didn't guess right on the first try is ServerAddress value pair. Second try worked with the Business Publisher server's domain name.   scriptrunner.userproperty1.key=ServerAddress scriptrunner.userproperty1.value=<use BP's domain name>   We also used \\ in the paths in server.home in the config file.
0
by Mayur Patel
Posted on Tue, 01/29/2013 - 13:27

hi,

 

Thanks for the help.  I havent managed to get it working yet but you have gotten me much further than before.

 

In response to other posters:

1.  I could be wrong about this but the scriptrunner.bat is in the <ARIS install folder>\server.  it is only available on machines with the business server installed.

2.  I also used an ABA key and it worked.

 

 

0
by Mayur Patel
Posted on Wed, 01/30/2013 - 14:23

Hi,

 

THe script is now running on my side but the result is always false.  I am able to manually update with the same values but not with the script even before it is scehduled.  

I also cannot find a way to get a reason, so I'm not sure where to look. 

 

Any ideas?

0
by Yaghwinder Bhatti
Posted on Thu, 04/11/2013 - 16:52

Hi,

 

I am trying the script but not getting the desired information.

In the output i get the following

Duration=0

Success=false

ServerAddress=127.0.0.1

ExportName=standard

 

Please help.

0
by Roman Joss
Posted on Thu, 04/11/2013 - 17:38

Hi

I think, that you do not use the standard-configuration in your Server. Please verify ServerAdress and ExportName.

0
by Yaghwinder Bhatti
Posted on Fri, 04/12/2013 - 13:42

Hi Roman,

 

Thanks for the prompt response.

I am not much aware of stuff in ARIS. Is there any step by step guide or if possible can you guide me through the steps.

 

I tried all steps mentioned above but didn't get the expected output.

 

I created this on the server hence i put 127.0.0.1 for server address and exportname i just put in random.

0
by Yaghwinder Bhatti
Posted on Tue, 04/23/2013 - 10:59

Can anyone help me out here please?

0
by Mayur Patel
Posted on Thu, 05/16/2013 - 15:03

Hi,

 

Thank you all for helping me get this working.  Highly appreciated

 

Mr Yaghwinder.  I was having the same problem as you but I reallised that the server address should not the the ARIS Business Server address but the ARIS Business Publishing Server address.  I hope that helps you.

0
by Mayur Patel
Posted on Tue, 05/21/2013 - 15:08

Hi,

 

I've got this working on smaller test databases - but when trying to run this on our production database i get the error below.  Any help?

Could this be related to the db size or something like that?  Incidentally - My test export off the small db takes 199 seconds to create or update using ABA but if I script it and run it through the script or scriptrunner, it takes more than 3000 seconds.  If you extrapolate this to my prod db its scary.

 

 

THe script I'm running is 

0
by Gerald Schroeder
Posted on Tue, 06/04/2013 - 11:52

Thank you Freddy for the excellent description!

With your hints the automatic update of our publication worked fine.

Best regards

Gerald

0
by Freddy Barkhuizen
Posted on Tue, 06/04/2013 - 12:42

Pleasure Gerald, glad to see that this post is still being used.

0
by Baglan Beisenov
Posted on Thu, 06/26/2014 - 15:44

Hi Freddy Barkhuizen. I really want your help. I have problem with the code I do not know.

When I run script is working  ok. But output file gives me  this output.

====================================================

ServerAddress not defined

ExportName not defined ====================================================   I do not know why is not taking server address and export Name: =================================================== scriptrunner.outputfile=C:\\Temp\\UpdateBusinessPublisher.txt  scriptrunner.evaluationfilterguid=    scriptrunner.scriptinput=DB    scriptrunner.userproperty.count=2    scriptrunner.userproperty1.key=ServerAddress scriptrunner.userproperty1.value=127.0.0.1    scriptrunner.userproperty2.key=ExportName scriptrunner.userproperty2.value=KTZH_Model =================================================== Thank you.    
0
by Giuseppe Spucches
Posted on Thu, 10/01/2015 - 07:48

Hi, I just installed Aris 9.8 and running the report makes the error :

script Export Business Publisher, line 11: Can't find method com.idsscheer.report.output.outputobject.asposeapi.AStandardDocument.Init(). (Export Business Publisher#11) com.aris.modeling.common.serverremoteapi.cscommon.scriptrunner.AScriptRunnerBase.logErrors

I simply removed the instruction : " aOutput.Init(); "  from the publisher report and it seems working.

0
by Sundus Israr
Posted on Tue, 12/08/2015 - 13:54

Hi, I am getting the following error when running in the Command Prompt after following all the steps mentioned above. Can anyone tell me about the following error and how it can be fixed?

image

0
by Sayed Ali
Posted on Wed, 01/27/2016 - 06:37

Hello Everybody,



Can some one tell me, whether we can configure "Automated Publishing" using the above steps mentioned for "Aris 9.7" ?



Appreciate everybody's assistance !



Thank you

0
by Carlos Sanchez
Posted on Wed, 05/25/2016 - 20:04

Hi All, just looking for some clarification. I am attempting to run this on my box which has the client installed on it, and it fails. Does this need to be run on the actual server's command prompt.

0
by Marius S.
Posted on Tue, 03/19/2019 - 14:30

Hi together, 

this topic is quite old, but the script mentioned above is not working for me in ARIS 10.0 is there a new script or a different solution to update daily a publisher export ? 

 

Thanks in advance. 

 

0
by Giuseppe Spucches
Posted on Tue, 06/16/2020 - 13:59

In reply to by Marius Sigmund

Hi people,

I'm sorry I dont have the answer but I have the same question.

Thanks

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock