Quantcast
Channel: SCN: Message List - SAP Business Process Automation by Redwood
Viewing all 2607 articles
Browse latest View live

Pass Parameter in Redwood script

$
0
0


Hi All,

 

Can anyone please help me how to pass parameter in a Redwood script.

 

For example:

 

jobdefparam.setDefaultExpression("BTCHWM");

 

 

How can I pass "BTCHWM" as a parameter.

 

 

Also please help me how to pass a chain level parameter in "post running action" of a script.

 

 

Regards,

Lohit


Re: Regarding reccurences way of scheduling the job in Cronacle V7.0

$
0
0

Please refer the enclosed screenshot and let me know where can I see the presubmit count.Screenshot.png

Script to change owner/user of Job Definition in CPS

$
0
0

Hi,

 

We are looking for the script which can change the user/owner of the job definition, by default when ever we create/import any job definition in CPS it adds the user in "Security Tab" along with Grant-All and Grantable-All permissions and it will be grayed out and no changes allowed to that object owner/user.

 

We have requirement to change the owner/user of the job definitions. Can any one provide the cps script logic to update user/owner.

 

Thanks

Nidhish

Re: Pass Parameter in Redwood script

$
0
0

Hello,

 

Define a parameter on the RedwoodScript job definition in the parameters tab, for instance call it defaultValue.

Now in your code you can just refer to it:

jobdefparam.setDefaultExpression(defaultValue);

 

To fetch a chain parameter in a postrunning action you need to look up the chain from jcsJob (the 'current' job) using something like:

Job chain = jcsJob.getParentJob().getParentJob(); // first the step, then the chain

String parameterValue = chain.getJobParameterByName("parameter name").getInValueString();

 

Regards Gerben

Re: Script to change owner/user of Job Definition in CPS

$
0
0

Hello,

 

This is not possible. The security model does not allow to change the owner of an object.

The only thing you can do is drop it and import it with a different user.

 

Regards Gerben

Re: Regarding reccurences way of scheduling the job in Cronacle V7.0

$
0
0

Hi,

 

Yes I see, sorry this is a nice example of how your mind can trick you. Since the last service pack for version 7 is from 2011 I have not been working with it very often over the last couple of years.

But anyway, to answer your question. If you click through on the link in the middle of the screen 'See the online documentation for details' and look into the sections or Recurrences you will find your answer. By default, 100 future jobs (up to 2 years ahead max) will be scheduled if you choose one of Daily, Weekly, Monthly, Yearly or Dates. When using a Submit Frame in Advanced (which is highly recommended by the way), you will just get 1 scheduled job.

If you want to see less future jobs, you can change a Registry Key that can be found under: Configuration->Environment->Registry->Public->RWS->Repository->Parameters. Now check if a key called RecurJobCount exists and if it does not have a value you can put it there. You will probably have to restart all your schedulers for the change to become effective.

 

Regards Gerben

forecast result to excel ?

$
0
0

Hello,

 

Our CPS has been recently upgraded to BPA.

Previously it was possible, with some manipulations, to export the result of forecast to excel ( condition : use browser Google chrome / action select all + copy/past function).

 

With the new version of BPA, Google chrome seems no more supported as browser. and I try to test with IE11 or Redwood Explorer but unsuccessfully.

 

I have to run forecast regularly (often before a technical intervention on backend systems) and sent info to Business who does not have BPA access.

So, could you let me know how we can export to excel the forecast result ??

 

thanks,

Kind regards,

Delphine

Re: Pass Parameter in Redwood script

$
0
0

Thank you very much Gerben.

 

As you said, I tried to refer the Chain level parameter using the below script

 

Job jc = jcsJob.getParentJob().getParentJob();
String jcparam = jc.getJobParameterByName("JOBCHAINNAME").getInValueString();
JobDefinition aJobDef = jcsSession.getJobDefinitionByName(jcparam);
Job aJob = aJobDef.prepare();

 

 

I am getting the below error. Please advise.

 

Caused by: java.lang.NullPointerException: while trying to invoke the method com.redwood.scheduler.api.model.Job.getParentJob() of a null object returned from com.redwood.scheduler.api.model.Job.getParentJob()

at com.redwood.scheduler.custom.CS_I73_IN_OBEXT_CHECK_FILE_EXIST_AGAIN_09execute(CS_I73_IN_OBEXT_CHECK_FILE_EXIST_AGAIN_09.java:user code 45)

at com.redwood.scheduler.custom.CS_I73_IN_OBEXT_CHECK_FILE_EXIST_AGAIN_09Stub.jcsExecute(CS_I73_IN_OBEXT_CHECK_FILE_EXIST_AGAIN_09Stub.java:24)

... 19 more

 

 

Regards,

Lohit


Re: Pass Parameter in Redwood script

$
0
0

I made small mistake. The code which you provided me actually works. Thank you very very much Gerben.

 

 

Thanks,

Lohit

Re: Script to change owner/user of Job Definition in CPS

$
0
0

Hi Blom,

 

Thanks for the input,

 

In production we imported all the Jobs with Named User with Full Access and all the jobs were working fine.

 

Recently Named User moved to different project and we removed the access and all the jobs/triggers started failed with Access issue. (error log is attached)

Its issue with triggers (triggers are using Job-definition owner for update/edit/submit) Also on disabling the trigger its works fine

 

And we figured since all the Jobs are under him we are getting this issue.

 

So now we need a way to update / change the owner/user for all the jobs.

 

Can you please suggest some other way of doing it, apart form Export and import as it is not feasible in Production environment

 

Thanks

Re: Regarding reccurences way of scheduling the job in Cronacle V7.0

$
0
0

Thanks for the response Gerben!!

 

If I am clicking the online documentation it is guiding me how to use Submit Frame & Time window.

 

I think here instead of using recurrences we can specify a date range , what is your opinion?

 

I dont think submit frame or Timewindow is required for simple scheduling like where my XYZ job is schedule to run at xx time on Sunday , please correct me If I am wrong.

 

Waiting for your feedback..!!

Re: File aware jobs

$
0
0

Hi Nanda/Nanak,

 

Tool Used : Redwood explorer V7 sp5

 

I have a similar issue where i need to check job status ( running, completed , erred etc) of several jobs daily which eats a lot of my time. I was thinking is there a way to , lets say , i need to check 10 jobs ,can i  run a query by giving job names and i can get the details ( starttime, endtime, status etc) , if possible i would then export this output to my email so that every time i don't have to check every job again n again.

 

PS: i tried google for this stuff , not really helpful.

 

Looking forward for your expertise advise on this, any pointers will be helpful.

 

Thanks,

Ashish Sharma

Re: Regarding reccurences way of scheduling the job in Cronacle V7.0

Redwood explorer V7 cronacle - job monitoring

$
0
0

Hi All,

 

Tool Used : Redwood explorer V7 sp5

 

I have a similar issue where i need to check job status ( running, completed , erred etc) of several jobs daily which eats a lot of my time. I was thinking is there a way to , lets say , i need to check 10 jobs ,can i  run a query by giving job names and i can get the details ( starttime, endtime, status etc) , if possible i would then export this output to my email so that every time i don't have to check every job again n again.

 

PS: i tried google for this stuff , not really helpful.

 

Looking forward for your expertise advise on this, any pointers will be helpful.

 

Thanks,

Ashish Sharma

Re: Script to change owner/user of Job Definition in CPS

$
0
0

Hello,

 

Here are some other options:

 

1) Easiest: add the roles back to the user in UME, import the user, revoke the roles again from UME (now dont touch the user anymore), what you can do is disable the user to prevent login.

2) Better: on the job definition on change action set the Action Subject user to another user with the correct privileges. If this is set, it overwrites the definition owner.

 

Regards Gerben


Re: Regarding reccurences way of scheduling the job in Cronacle V7.0

$
0
0

If you just want to schedule on a Sunday set the first start time to next Sunday on the correct time, now specify submit frame RW_EVERY_WEEK, so indeed no time window required.

The recurrences have sometimes odd behavior in several corner cases. From experience submit frames have proven to be more reliable.

 

Regards Gerben

Re: Redwood explorer V7 cronacle - job monitoring

$
0
0

Hi Ashish,

 

Use mail type job definition for this, and in Action->precondition develop a redwood script to and pass the out to Parameter and same output can be used in HTML source code.

 

you can use the below query to get active jobs or you can give job names if needed.

 

select Job.* from Job where Job.Status IN ('R','W') order by Job.ScheduledStartTime desc

 

 

Regards,

Ravindranath Reddy

 

 

 

 

 

;

 

 

Blue Color Significance in Job Monitor

$
0
0

Hi Experts,

 

During audit of CPS,we have provided some screen shots of the jobs ran in our system.

In the screen shots,some of the jobs are having blue color over normal black color of other jobs.

Please find the screen shot.

 

Color.jpg

Is anyone having any idea about the blue color significance for only some of the job/job chain's are having?

SFTP from CPS

$
0
0

Hi,
We are running on M33 -61 .Is this version capable of sending files through SFTP .Has any one tried ? Any inputs would be greatly helpful.

 

 

Regrads

Balaji Natarajan

Re: Script to change owner/user of Job Definition in CPS

$
0
0

Awesome thanks dude

 

2nd Option works for me

Viewing all 2607 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>