-
1. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
kcbabo Apr 10, 2013 9:54 PM (in response to stonesoft)What's happening here is that our property substitution support is attempting to resolve ${file:name} as a property and is probably failing to resolve a value at deployment time (which makes sense based on how you are using it) and using "name" as the default setting. The URL encoding probably fools our property substitution support into not trying to replace the property and the Camel File component decodes the configuration URI and is a happy camper.
This is an unfortunate collision between our property support and what can be pushed down into Camel.
@David - should we support an escape sequence/syntax for property tokens so that our property substitution will ignore it? Obviously encoding the values works, but I'm thinking something friendlier might be nice, e.g.[${file:name}.DONE]
-
2. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
dward Apr 11, 2013 11:09 AM (in response to kcbabo)Yup; that is exactly what is happening.
Escape syntax ideas, starting with something similar to what you had (note that we only need to escape the property part of the string value - not the .DONE part):
- [${file:name}].DONE
- ${{file:name}}.DONE
- $${file:name}.DONE
- _${file:name}.DONE
- \${file:name}.DONE
My favorite is #3, the "double-dollar" sign.
Another idea would be for us to change OUR dollar sign $ to something else that doesn't collide with camel. Maybe a pound or a percentage:
- #{propertyName:defaultValue}
- %{propertyName:defaultValue}
- @propertyName:defaultValue@
I gotta say, though, that I'm not a huge fan of those. (PS: That 3rd one is "ant-ish".) I like using dollar signs - people "get" that.
I'm open to other ideas/preferences...
...or we could see what AS does for escaping, as right now we use the same syntax it uses.
-
3. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
kcbabo Apr 15, 2013 8:10 AM (in response to dward)I'm a fan of the brackets personally (#1), but I could live with #3 as well. Like you, I'm against alternate property syntax (which would probably have to support escaping as well).
Here's the JIRA:
-
4. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
tadayosi Jun 4, 2013 8:35 AM (in response to kcbabo)Hi David & Keith,
It looks like SWITCHYARD-1409 has already been resolved as Out of Date. So what's the conclusion of this topic and how will we be able to escape Camel expressions from SY property substitution since SY 1.0 ? Isn't it that we needn't bother with this problem any more and that we just use ${...} notation ?
Thanks,
Tadayoshi
-
5. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
dward Jun 4, 2013 8:50 AM (in response to tadayosi)It was fixed as part of the work for SWITCHYARD-1486. Basically, use the double-dollar notation, which is the escape sequence. So "Hello $${name}" becomes "Hello ${name}" after translation, without trying to look up the name property.
-
6. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
tadayosi Jun 4, 2013 9:00 PM (in response to dward)David, thanks for the clarification!
-
7. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
stonesoft Jul 22, 2013 3:38 PM (in response to dward)Tested this with switchyard 1.0 and <file:doneFileName>$${file:name}.DONE</file:doneFileName> works.
-
8. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
kcbabo Jul 22, 2013 3:41 PM (in response to stonesoft)Were you the user that wanted service exceptions to result in files being moved to the configured error directory for Camel service bindings? If so, that works in SY 1.0 as well.
-
9. Re: switchyard 0.8 doneFileName needs %7B %7D instead of { }
stonesoft Jul 22, 2013 9:02 PM (in response to kcbabo)Thanks! I'll test that tomorrow.