cancel
Showing results for 
Search instead for 
Did you mean: 

Get the resource context from a SchedulerTask

Former Member
0 Kudos

Hello,

I need to acces to some resources from a Scheduler Task, the problem is that I can't get the connected user (I guess that id this is supposed to work as a service it has no sense tu have a user). Then if I have no user how can I get the IResourceContext needed to get a resource.

Thanks in advance.

Best regards,

Gregori Coll Ingles.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gregori,

Take a look at my following weblog.

https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1515

IUser user = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
ResourceContext ctxt = new ResourceContext(user);

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Prakash Singh ,

thanks a lot for your answer it was very helpfull.

Now, I found another problem, does anybody know if there is a way to create new properties for the task, so that through EP I could set the values and the task would do one or another thing?

Thanks in advance.

Regards,

Gregori Coll Ingles.