Re: Urgent: Most urgently needed shark 1.1-2 download
"Daniel Frey" <[email protected]> Tue, 30 May 2006 23:42:18 +0200
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. ------=_NextPart_000_01E1_01C68442.B0A2B900 Content-Type: multipart/alternative; boundary="----=_NextPart_001_01E2_01C68442.B0B68F20" ------=_NextPart_001_01E2_01C68442.B0B68F20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Trying to compile the source, I detected a problem in the SharkPackageValidator class. Attached is a patched version of it without the three unused import statements. Cheers Daniel _____ Von: Daniel Frey [mailto:[email protected]] Gesendet: Dienstag, 16. Mai 2006 17:59 An: [email protected] Betreff: [shark] Urgent: Most urgently needed shark 1.1-2 download Wichtigkeit: Hoch Hi everybody Could somebody point me to a link that contains the shark 1.1-2 source and binary release. We are struggling wit a DODS CuncurrentModification Bug, which seems to be solved in 1.1-2. However, to adapt the project to the new 2.0-beta1 is out of scope at the moment. That would be very nice. Thanks in advance. Daniel Frey ------=_NextPart_001_01E2_01C68442.B0B68F20 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii"> <META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR></HEAD> <BODY> <DIV dir=3Dltr align=3Dleft><SPAN class=3D641193921-30052006><FONT face=3DV= erdana=20 size=3D2>Trying to compile the source, I detected a problem in the=20 SharkPackageValidator class. Attached is a patched version of it without th= e=20 three unused import statements.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D641193921-30052006><FONT face=3DV= erdana=20 size=3D2></FONT></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D641193921-30052006><FONT face=3DV= erdana=20 size=3D2>Cheers</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D641193921-30052006><FONT face=3DV= erdana=20 size=3D2>Daniel</FONT></SPAN></DIV><BR> <DIV class=3DOutlookMessageHeader lang=3Dde dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <FONT face=3DTahoma size=3D2><B>Von:</B> Daniel Frey [mailto:qwer12341@gmx.= ch]=20 <BR><B>Gesendet:</B> Dienstag, 16. Mai 2006 17:59<BR><B>An:</B>=20 [email protected]<BR><B>Betreff:</B> [shark] Urgent: Most urgently needed= =20 shark 1.1-2 download<BR><B>Wichtigkeit:</B> Hoch<BR></FONT><BR></DIV> <DIV></DIV> <DIV><SPAN class=3D501403815-16052006><FONT face=3DVerdana size=3D2>Hi=20 everybody</FONT></SPAN></DIV> <DIV><SPAN class=3D501403815-16052006><FONT face=3DVerdana=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D501403815-16052006><FONT face=3DVerdana size=3D2>Could s= omebody=20 point me to a link that contains the shark 1.1-2 source and binary rel= ease.=20 We are struggling wit a DODS CuncurrentModification Bug, which seems to be= =20 solved in 1.1-2. However, to adapt the project to the new 2.0-beta1 is out = of=20 scope at the moment.</FONT></SPAN></DIV> <DIV><SPAN class=3D501403815-16052006><FONT face=3DVerdana=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D501403815-16052006><FONT face=3DVerdana size=3D2>That wo= uld be very=20 nice. Thanks in advance.</FONT></SPAN></DIV> <DIV><SPAN class=3D501403815-16052006><FONT face=3DVerdana=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D501403815-16052006><FONT face=3DVerdana size=3D2>Daniel= =20 Frey</FONT></SPAN></DIV></BODY></HTML> ------=_NextPart_001_01E2_01C68442.B0B68F20-- ------=_NextPart_000_01E1_01C68442.B0A2B900 Content-Type: text/java; name="SharkPackageValidator.java" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="SharkPackageValidator.java" package org.enhydra.shark; import java.net.URL; import java.util.List; import org.enhydra.shark.api.SharkTransaction; import org.enhydra.shark.api.client.wfbase.BaseException; import org.enhydra.shark.util.ResourceManager; import org.enhydra.shark.xpdl.StandardPackageValidator; import org.enhydra.shark.xpdl.XMLAttribute; import org.enhydra.shark.xpdl.XMLComplexElement; import org.enhydra.shark.xpdl.XMLElement; import org.enhydra.shark.xpdl.XMLUtil; import org.enhydra.shark.xpdl.XMLValidationError; import org.enhydra.shark.xpdl.XPDLConstants; import org.enhydra.shark.xpdl.elements.Activity; import org.enhydra.shark.xpdl.elements.ActivitySet; import org.enhydra.shark.xpdl.elements.ActualParameter; import org.enhydra.shark.xpdl.elements.ActualParameters; import org.enhydra.shark.xpdl.elements.Application; import org.enhydra.shark.xpdl.elements.ArrayType; import org.enhydra.shark.xpdl.elements.BasicType; import org.enhydra.shark.xpdl.elements.DataField; import org.enhydra.shark.xpdl.elements.EnumerationType; import org.enhydra.shark.xpdl.elements.FinishMode; import org.enhydra.shark.xpdl.elements.FormalParameter; import org.enhydra.shark.xpdl.elements.ListType; import org.enhydra.shark.xpdl.elements.Manual; import org.enhydra.shark.xpdl.elements.Package; import org.enhydra.shark.xpdl.elements.Participant; import org.enhydra.shark.xpdl.elements.Performer; import org.enhydra.shark.xpdl.elements.RecordType; import org.enhydra.shark.xpdl.elements.SchemaType; import org.enhydra.shark.xpdl.elements.Script; import org.enhydra.shark.xpdl.elements.TypeDeclaration; import org.enhydra.shark.xpdl.elements.UnionType; import org.enhydra.shark.xpdl.elements.WorkflowProcess; /** * Special shark validation - to determine if the package is 'shark' valid.= It * extends the JaWE's package validator to add some additional restrictions. *=20 * @author Sasa Bojanic */ public class SharkPackageValidator extends StandardPackageValidator { public void validateElement(XMLAttribute el, List existingErrors, boolea= n fullCheck) { super.validateElement(el, existingErrors, fullCheck); XMLElement parent =3D el.getParent(); boolean isValid =3D true; if (el.toName().equals("Type") && parent instanceof BasicType) { String choosenSubType =3D el.toValue(); if (choosenSubType.equals(XPDLConstants.BASIC_TYPE_PERFORMER) || choosenSubType.equals(XPDLConstants.BASIC_TYPE_REFERENCE)= ) { isValid =3D false; } } if (!isValid) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_DATA_TYPE, el.toName(), el); existingErrors.add(verr); } } public void validateElement(ArrayType el, List existingErrors, boolean f= ullCheck) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_DATA_TYPE, el.toName(), el); existingErrors.add(verr); } public void validateElement(EnumerationType el, List existingErrors, boo= lean fullCheck) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_DATA_TYPE, el.toName(), el); existingErrors.add(verr); } public void validateElement(ListType el, List existingErrors, boolean fu= llCheck) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_DATA_TYPE, el.toName(), el); existingErrors.add(verr); } public void validateElement(Manual el, List existingErrors, boolean full= Check) { Activity act =3D XMLUtil.getActivity(el); if (act.getActivityType() !=3D XPDLConstants.ACTIVITY_TYPE_TOOL || el= .getParent().getParent() instanceof FinishMode) return; String performer =3D act.getPerformer(); boolean isSystemParticipantPerformer =3D false; Participant p =3D null; p =3D XMLUtil.findParticipant(xmlInterface, XMLUtil.getWorkflowProces= s(act), performer); if (p !=3D null) { String participantType =3D p.getParticipantType().getType(); if (participantType.equals(XPDLConstants.PARTICIPANT_TYPE_SYSTEM))= { isSystemParticipantPerformer =3D true; } } if (isSystemParticipantPerformer) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_MANUAL_START_MODE_FOR_TOOL_ACT= IVITY_WITH_SYSTEM_PARTICIPANT_PERFORMER, act.getId(), el); existingErrors.add(verr); } } public void validateElement(org.enhydra.shark.xpdl.elements.Package el, = List existingErrors, boolean fullCheck) { super.validateElement(el, existingErrors, fullCheck); if (existingErrors.size()=3D=3D0 || fullCheck) { validateScript(el.getScript(), existingErrors, fullCheck); } } public void validateElement(Performer el, List existingErrors, boolean f= ullCheck) { super.validateElement(el, existingErrors, fullCheck); if (fullCheck || existingErrors.size() =3D=3D 0) { // check performer Activity act=3DXMLUtil.getActivity(el); String performer =3D el.toValue(); int type =3D act.getActivityType(); if (type =3D=3D XPDLConstants.ACTIVITY_TYPE_NO) { Participant p =3D null; WorkflowProcess wp =3D XMLUtil.getWorkflowProcess(act); p =3D XMLUtil.findParticipant(xmlInterface, wp, performer); if (p !=3D null) { String participantType =3D p.getParticipantType().getType(); if (participantType.equals(XPDLConstants.PARTICIPANT_TYPE_SY= STEM)) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_SYSTEM_PARTICIPANT_PE= RFORMER_FOR_NO_IMPLEMENTATION_ACTIVITY, act.getId(), el); existingErrors.add(verr); } } } } } public void validateElement(RecordType el, List existingErrors, boolean = fullCheck) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_DATA_TYPE, el.toName(), el); existingErrors.add(verr); } public void validateElement(SchemaType el, List existingErrors, boolean = fullCheck) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_DATA_TYPE, el.toName(), el); existingErrors.add(verr); } public void validateElement(UnionType el, List existingErrors, boolean f= ullCheck) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_DATA_TYPE, el.toName(), el); existingErrors.add(verr); } /** Introduces restrictions on script type. */ public void validateScript(Script el, List existingErrors, boolean fullC= heck) { String sType =3D el.getType(); boolean isScriptInvalid =3D false; SharkTransaction t =3D null; try { t =3D SharkUtilities.createTransaction(); isScriptInvalid =3D SharkEngineManager.getInstance().getScriptingM= anager().getEvaluator(t, sType) =3D=3D null; // SharkUtilities.commitTransaction(t); } catch (Exception ex) { // try { SharkUtilities.rollbackTransaction(t);}catch(Exception e)= {} isScriptInvalid =3D true; } finally { try { SharkUtilities.releaseTransaction(t); } catch (BaseException e) { } } if (isScriptInvalid) { XMLValidationError verr =3D new XMLValidationError( XMLValidationError.TYPE_ERROR, XMLValidationError.SUB_TYPE_LOGIC, SharkValidationErrorIds.ERROR_UNSUPPORTED_SCRIPT, sType, el); existingErrors.add(verr); } } protected boolean isRemoteSubflowIdOK(String subflowID) { try { new URL(subflowID); } catch (Throwable thr) { return false; } return true; } public boolean isIdValid(String id) { return super.isIdValid(id) && id.length() <=3D 90; } public boolean isExternalPackageError (Package main,List errors) { for (int i=3D0; i<errors.size(); i++) { XMLValidationError err=3D(XMLValidationError)errors.get(i); if (XMLUtil.getPackage(err.getElement())=3D=3Dmain) { return false; } } return true; } public boolean hasErrors (List errors) { for (int i=3D0; i<errors.size(); i++) { XMLValidationError err=3D(XMLValidationError)errors.get(i); if (err.getType().equals(XMLValidationError.TYPE_ERROR)) { return true; } } return false; } public String createXPDLValidationErrorsString(List existingErrors) { String str=3D"<html>"; for (int i=3D0; i<existingErrors.size(); i++) { XMLValidationError verr=3D(XMLValidationError)existingErrors.get(i= ); String retVal=3D""; XMLElement el=3Dverr.getElement(); if (el !=3D null) { retVal+=3D"Type=3D"+verr.getType(); retVal+=3D", Sub-Type=3D"+verr.getSubType(); retVal +=3D", Location=3D"+getLocString(getLocation(el),el)+":= "; retVal+=3D"<br>"; String err=3DResourceManager.getLanguageDependentString(verr.g= etId()); if (err=3D=3Dnull) { err=3Dverr.getId(); } retVal+=3Derr; if (verr.getDescription()!=3Dnull && verr.getDescription().len= gth()>0) retVal+=3D": "+verr.getDescription(); } str=3Dstr+retVal+"<br><br>"; } str+=3D"</html>"; return str; } public static XMLElement getLocation (XMLElement el) { XMLElement location =3D XMLUtil.getActivity(el); if (location =3D=3D null) { location =3D XMLUtil.getTransition(el); } if (location =3D=3D null) { location =3D XMLUtil.getTransition(el); } if (location =3D=3D null) { location =3D XMLUtil.getParentElement(TypeDeclaration.class, el); } if (location =3D=3D null) { location =3D XMLUtil.getParentElement(FormalParameter.class, el); } if (location =3D=3D null) { location =3D XMLUtil.getParentElement(Application.class, el); } if (location =3D=3D null) { location =3D XMLUtil.getParentElement(Participant.class, el); } if (location =3D=3D null) { location =3D XMLUtil.getParentElement(DataField.class, el); } ActivitySet as =3D XMLUtil.getActivitySet(el); if (location =3D=3D null) { location =3D as; } WorkflowProcess wp =3D XMLUtil.getWorkflowProcess(el); if (location =3D=3D null) { location =3D wp; } Package pkg =3D XMLUtil.getPackage(el); if (location =3D=3D null) { location =3D pkg; } return location; } public static String getLocString (XMLElement location,XMLElement el) { ActivitySet as =3D XMLUtil.getActivitySet(el); WorkflowProcess wp =3D XMLUtil.getWorkflowProcess(el); Package pkg =3D XMLUtil.getPackage(el); String loc =3D "Package" + " '" + pkg.getId() + "'"; if (wp !=3D null) { loc +=3D ", " + "WorkflowProcess" + " '" + wp.getId()+ "'"; } if (as !=3D null) { loc +=3D ", " + "ActivitySet" + " '" + as.getId() + "'"; } if (location !=3D as && location !=3D wp && location !=3D pkg) { loc +=3D ", " + location.toName() + " '" + ((XMLComplexElement) location).get("Id").toValue() + "'"; } if (el !=3D location && el !=3D as && el !=3D wp && el !=3D pkg) { XMLComplexElement sbflwOrTool=3Dnull; if (el instanceof ActualParameter) { sbflwOrTool=3D(XMLComplexElement)el.getParent().getParent(); } else if (el instanceof ActualParameters) { sbflwOrTool=3D(XMLComplexElement)el.getParent(); } if (sbflwOrTool!=3Dnull) { loc+=3D", "+sbflwOrTool.toName()+" '"+sbflwOrTool.get("Id").toV= alue()+"'"; } loc +=3D " -> " + el.toName(); } return loc; } } ------=_NextPart_000_01E1_01C68442.B0A2B900 Content-Type: text/plain; name="message-footer.txt" Content-Disposition: inline; filename="message-footer.txt" Content-Transfer-Encoding: 8bit -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws ------=_NextPart_000_01E1_01C68442.B0A2B900--