[midPoint] recompute bypass FatalError
Oskar Butovič - AMI Praha a.s.
oskar.butovic at ami.cz
Mon Dec 19 18:07:19 CET 2016
Hello Everybody,
currently my biggest issue is that google API sometimes returns 503 service
unavailable. This result in fatal error in recompute task.
I need this to result only in partial error for recompute task to continue.
Which exception should I throw from connector? I know that it can be solved
easily in midpoint 3.5 but AFAIK it is not ready yet and when it becomes
ready I have a lot to fix because of prism changes.
I also tried writing script execution task but exception somehow makes it
through try catch in groovy and stops task execution. Code below:
<s:action>
<s:type>execute-script</s:type>
<s:parameter>
<s:name>script</s:name>
<c:value xsi:type="c:ScriptExpressionEvaluatorType">
<c:code>
import
com.evolveum.midpoint.util.exception.ExpressionEvaluationException;
import java.io.StringWriter;
import java.io.PrintWriter;
import
com.evolveum.midpoint.xml.ns._public.common.common_3.UserType;
try{
midpoint.recompute(UserType.class, input.oid);
log.error("recomputing user " + input.getName() + " finished OK");
}catch(Exception exception){
StringWriter errors = new StringWriter();
exception.printStackTrace(new PrintWriter(errors));
stackTrace = errors.toString();
//log.error("recomputing user " + input.getName() + " threw exception " +
stackTrace);
}
</c:code>
</c:value>
</s:parameter>
</s:action>
Best Regards
Oskar Butovič
--
Oskar Butovič
solution architect
gsm: [+420] 774 480 101
e-mail: oskar.butovic at ami.cz
AMI Praha a.s.
Pláničkova 11
162 00 Praha 6
tel.: [+420] 274 783 239
web: www.ami.cz
[image: AMI Praha a.s.]
[image: AMI Praha a.s.]
<http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>
Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
písemnou formu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20161219/55a391c9/attachment.htm>
More information about the midPoint
mailing list