 |
|
 |
You've only shown one service.
If that's the service that is returning an error occasionally:
1) Set the includeExceptionDetailInFaults to true so you get more
info with the HTTP 500 response.
2) Based on the baseAddress, it looks like you're already hosting
it in the development environment. You should be able to start the service
in the debugger!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
 |
|
 |
Hello Mark ,
I having the same problem!!!
All asinc methods rais an exception , either if they are signed in comment.
It started sudenlly.
any Ideas?
|
|
|
|
 |
|
 |
I have developed a Workflow and published it as WCF webservice on IIS.
I then created a Silverlight 3 webapplication that references the published svc webservice.
The clientaccesspolicy.xml is in the wwwroot of the webserver.
When calling the silverlight webapplication, the call sometimes works perfectly and sometimes give the Async_Exception.
We have been struggling with this for a week now.
Appreciate any help in the matter.
Thanks !
|
|
|
|
 |
|
 |
I have a set of WF custom activities that inherit core behaviors from from a base activity class. So the hierarchy is:
SomeCustomActivity : MyActivityBase : Activity
I would like SomeCustomActivity to appear in the VS 2008 WF toolbox (it does) but NOT MyActivityBase (it does, no matter what I try).
Seems like this should be doable fairly easily, after all Activity itself never appears in the toolbox.
AJ
|
|
|
|
 |
|
 |
Decorate your base activity class with the ToolboxItem attribute thus:
[ToolboxItem(false)]
|
|
|
|
 |
|
 |
Many thanks for your response, Aviad. Your suggestion turns out to be half the solution.
In addition to decorating the base class as you suggest, you must follow that with decorating any derived classes with:
[ToolboxItemAttribute(typeof(ActivityToolboxItem))]
If you don't do this, the derived classes inherit the [ToolboxItem(false)] from the base class. (I can't take credit for this; the whole solution was suggested to me in another forum.)
|
|
|
|
 |
|
 |
I am trying to find a sample for a navigational wf in .net 4.0 which uses asp.net web app, just like the "Dating Service" app saple that was published for .net 3.5 whcih used the "DateSiteNavigation" workflow.
Does anyone have a sample in wf 4.0?
Thanks
|
|
|
|
 |
|
 |
Even am looking for something similar..
|
|
|
|
 |
|
 |
Hello All,
I have a workflow that I recently added a wcf send activity too. For some reason, whenever it hits the send activity, that instance completely hangs and never moves forward. I removed the send to ensure it wasn't caused by something else, and it'll work fine at that point. I tested the wcf service itself with the .net wcf tester, and I can invoke it just fine. I'm using the endpoint name for the channeltoken property right from the app.config, i'm also using it as the endpoint name property. I also set the owneractivityname to the name of the send activity. I'm not getting an error or any feedback, just hanging. Any suggestions would be greatly appreciated.
Thanks,
Ryan
|
|
|
|
 |
|
 |
I'm researching Workflow Services as I think we have a classic workflow scenario. The system I'm about to design will allow users to process a fincancial transactions from request up to release with several stages, validation, authortisation etc. which I want to expose as a State Machine workflow (the processing dictates this rather than sequencial). So far, so fluffy (& pink & cute).
I thought I'd look into workflow and after a couple of days research I have found the following problems (which may be fundamental, but are most probably holes in my knowledge).
- When I expose a workflow as a service, I am under a workflow context. The problem I have is that I want to list workflows in a particular state (e.g. all workflows ready to be validated), So the user can select and re-start processing. Is this easy/possible without exposing another WCF service?
- Is there any way to tie the workflow state to the instance of the object under question. For example, if I have a transaction with its flag set to
For the first one I can find any number of articles giving examples of how to process an individual workflow, but managing multiple active (but dormant) workflows is another matter.
The second point I suspect is impractical as it looks like the foundation of WF is the process contains the object and not vice versa.
I am prepared for flaming here, but I've wracked my brains (and google) trying to find solutions to the above, so what the heck. If anyone has any suggestions to further my research, they will be gratefully received.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
 |
|
 |
Hi, all. I have such problem:
I need a workflow, which solves the following tasks:
Approval workflow (such as default in MOSS 2007) + a possibility to send email messages to participants of Approval workflow when document, on which approval workflow was started, is modified.
For such a distribution has written a workflow, which is triggered by changes in the document and the code is running check whether the approval process started. But bad luck, if the document library includes support check out \ check in, then we have the following troubles - SharePoint commits a change to the list item both in check out and check in. As a result we have two changes and my email-workflow starts twice. As a result, one that very moment, we obtain immediately two letters to change the document in mailbox.
How can I solve such problem?
May already exists a approval workflow, which makes this newsletter. Thanks in advance.
|
|
|
|
 |
|
 |
Hi!
Is there a way to Set the version of the compiled assembly when compiling an xoml file (and the code beside file) for WF.
When I compile, the assembly gets the version 0.0.0.0 but I would like to set it myself.
I've searched everywhere but cannot find any solution! Anyone got any suggestion?
Best Regards!
Marcus
|
|
|
|
 |
|
 |
Hi guys,
I'm developing a application like Request-Approval kind of requirement using ASP.NET with Workflow.
Getting the error message like "This workflow is not owned by the WorkflowRuntime. The WorkflowRuntime's ownership has expired, or another WorkflowRuntime owns the workflow"
In Request.aspx.cs, im raising request, see the below code for calling workflow
public partial class Request : System.Web.UI.Page
{
private WorkflowRuntime runtime;
private RequestService objReqService;
private Dictionary<string, StateMachineWorkflowInstance> stateMachineInstances;
private void StartWorkflowRuntime()
{
runtime = new WorkflowRuntime();
EventHandlers for the WorkflowRuntime
runtime.WorkflowTerminated += new EventHandler<WorkflowTerminatedEventArgs>(Runtime_WorkflowTerminated);
runtime.WorkflowCompleted += new EventHandler<WorkflowCompletedEventArgs>(Runtime_WorkflowCompleted);
runtime.WorkflowIdled += new EventHandler<WorkflowEventArgs>(Runtime_WorkflowIdled);
ExternalDataExchangeService dataExchangeService = new ExternalDataExchangeService();
runtime.AddService(dataExchangeService);
string connStringPersistence = ConfigurationManager.ConnectionStrings["WFPersistence"].ConnectionString;
SqlWorkflowPersistenceService sqlPersistance = new SqlWorkflowPersistenceService(connStringPersistence, true, new TimeSpan(500, 0, 0), new TimeSpan(100, 0, 0));
runtime.AddService(sqlPersistance);
SqlTrackingService sqltracking = new SqlTrackingService(connStringPersistence);
runtime.AddService(sqltracking);
objReqService = new RequestService();
dataExchangeService.AddService(objReqService);
runtime.StartRuntime();
stateMachineInstances = new Dictionary<string, StateMachineWorkflowInstance>();
}
private Guid StartRequestWorkflow()
{
Assembly RequestWorkflowsAssembly = Assembly.Load("Test");
Type workflowType = RequestWorkflowsAssembly.GetType("WorkFlow.Test");
if (workflowType == null) return Guid.Empty;
WorkflowInstance instance = runtime.CreateWorkflow(workflowType);
StateMachineWorkflowInstance stateMachineInstance = new StateMachineWorkflowInstance(runtime, instance.InstanceId);
instance.Start();
stateMachineInstances.Add(instance.InstanceId.ToString(), stateMachineInstance);
return instance.InstanceId;
}
protected void btnSubmitReq_Click(object sender, EventArgs e)
{
StartWorkflowRuntime();
Guid workflowInstanceId = StartRequestWorkflow();
objReqService.RaiseRequestCreatedEvent(ReqID, workflowInstanceId);
}
}
The above code works fine everything, whenever i create the request, all details persisted in the sql server events and states everything stored in the sql server database.
There is a another page called Approval page, Used to approve the particular request. In that page when i load the workflow instance using GUID im getting these error like "This workflow is not owned by the WorkflowRuntime. The WorkflowRuntime's ownership has expired, or another WorkflowRuntime owns the workflow"
Below code for Approval.aspx.cs
public partial class Approval : System.Web.UI.Page
{
private WorkflowRuntime runtime;
private RequestService objReqService;
private Dictionary<string, StateMachineWorkflowInstance> stateMachineInstances;
private void StartWorkflowRuntime()
{
runtime = new WorkflowRuntime();
EventHandlers for the WorkflowRuntime
runtime.WorkflowTerminated += new EventHandler<WorkflowTerminatedEventArgs>(Runtime_WorkflowTerminated);
runtime.WorkflowCompleted += new EventHandler<WorkflowCompletedEventArgs>(Runtime_WorkflowCompleted);
runtime.WorkflowIdled += new EventHandler<WorkflowEventArgs>(Runtime_WorkflowIdled);
ExternalDataExchangeService dataExchangeService = new ExternalDataExchangeService();
runtime.AddService(dataExchangeService);
string connStringPersistence = ConfigurationManager.ConnectionStrings["WFPersistence"].ConnectionString;
SqlWorkflowPersistenceService sqlPersistance = new SqlWorkflowPersistenceService(connStringPersistence, true, new TimeSpan(500, 0, 0), new TimeSpan(100, 0, 0));
runtime.AddService(sqlPersistance);
SqlTrackingService sqltracking = new SqlTrackingService(connStringPersistence);
runtime.AddService(sqltracking);
objReqService = new RequestService();
dataExchangeService.AddService(objReqService);
runtime.StartRuntime();
stateMachineInstances = new Dictionary<string, StateMachineWorkflowInstance>();
}
protected void bntApproveRequest_Click(object sender, EventArgs e)
{
StartWorkflowRuntime();
string strGUI = Request.GetGUI(RequestID);
Guid workflowInstanceId = new Guid(strGUI);WorkflowInstance instance = runtime.GetWorkflow(workflowInstanceId); (Here Im getting error)
.....
...
}
}
Again in that page i load the runtime and get the workflow instance. I already checked i pass the correct GUID. i made mistake somewhere.
Also i increased Persistence time 500 hr. Please check the above code, provide solution for this.
Appreciate your help.
-Prakal.
modified on Tuesday, September 15, 2009 5:48 AM
|
|
|
|
 |
|
 |
I am going to develo leave application system in asp.net with WF.
but i have no idea that i have to use Workflow foundation for Business logic or for complete project.
mannu
|
|
|
|
 |
|
 |
Hello,
I am a ASP.NET web developer. I need to design a Work Flow for an Application which has about 75+ forms & tables. I need a supporting toolkit which can be used by the end user of my application who can configure his own flows dynamically. The workflow engine should provide a web based graphical designer for the end user.
If you can suggest some product which is available in the market which can be a open source or even a commercial product, which should be reliable & more economical. The work flow engine should be more dynamic & more user friendly.
Regards
Darpan Perumal
|
|
|
|
 |
|
 |
This seems like an obvious question to me, but I'm having trouble tracking down an answer.
I am trying to put together an application that is driven by a state machine workflow behind the scenes. The UI has a menu, the contents of which change depending on the current state of the workflow. Basically, I would like the menu to reflect the list of actions available for the current state. I can query a state machine workflow to find the list of available state transitions, but that doesn't really tell me what I need to know. I guess I'm looking for a way to get hold of a list the events which the workflow will respond to in its current state.
I can't be the first person to want to do this. I want the workflow to dynamically supply the options available to the user through the UI depending on its current state. What is the recommended best practice for achieving this? Is it even possible, and will I end up having to set up my own cross-reference somewhere?
I am relatively new to .NET WF, but familiar with the concept of state machines and it's possible I'm expecting too much of WF.
|
|
|
|
 |
|
 |
If you don't get an answer here try the MSDN WF forum.
Kevin
|
|
|
|
 |
|
 |
ReadOnlyCollection<WorkflowQueueInfo> subActivities = stateMachineInstance.WorkflowInstance.GetWorkflowQueueData();
Collection<string> MessagesAllowed = new Collection<string>();
foreach (WorkflowQueueInfo queueInfo in subActivities)
{
EventQueueName queuename = queueInfo.QueueName as EventQueueName;
if (queuename != null)
{
MessagesAllowed.Add(queuename.MethodName);
}
}
When WorkflowState Changed, do above to retrieve the event names of current state (MessagesAllowed has them), then update UI, it is ok.
hope it can help you!
|
|
|
|
 |
|
 |
I have an event handler on a Thumb.DragDelta event.
In it I call
DragDrop.DoDragDrop(someRandomUIelement, theData, DragDropEffects.All)
but it doesn't drag!
I wonder what is the puporse of the 1st argument... there is no documentation on it...
Anyway,out of curiosity I registered the following event handlers on someRandomUIelement:
GiveFeedback, QueryContinueDrag, Previewfeedback, and PreviewQueryContinueDragging.
To my despair the event.Effect is always sets to None!
But it's a readonly property so I can't do anything...
Any idea why Drag & Dropmight not work in my case?
One last thing, in this case the only UI element I have access to (someRandomUIelement) is an adorner, I wonder if it might be the cause of failure?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
modified on Saturday, August 8, 2009 9:45 AM
|
|
|
|
 |
|
 |
Solved!
It had something to do with
AllowDrop="True"
I set it on the ItemsControl inside my UserControl to no avail.
But if I set it in the UserControl it works!
even when, just out of curiosity, I set it to False in the ItemsControl.
Quite puzzling....
Next time I know I just have to set AllowDrop everywhere and see what happen...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
 |
|
 |
Sorry for my English.WF is rather new for me.
As i understood there are 2 type of ExecutionContexts.
1.Main Execution Context
2.Sub Execution Contexts
So this is the code from "Essential Windows Workflow Foundation".
It`s about writing WHERE activity.
ActivityExecutionContextManager manager=context(***).ExecutionContextManager;
Activity template=...
//Creating subcontext
ActivityExecutionContext newContext=manager.CreateExecutionContext(template);
Activity newInstance=newContext.Activity;
newInstance.Closed+=this.ContinueAt;
newContext.ExecuteActivity(newInstance); (*)
void ContinueAt(object sender,...)
{
ActivityExecutionContext context=sender as ActivityExecutionContext;(**)
...
}
So the line * looks like starting activity on behalf of newContext.And this is explained in book.
So the newInstance belongs and executed in newContext,then WHY sender(**) == MainExecutionContext(***)?
Does it mean that in ANY part of code i can write A.ExecuteActivity(B) and B ClosedEventHandler doesn`t get A as 1st param.
|
|
|
|
 |
|
 |
Think of the AEC as a stack trace. When you made the new AEC and executed the activity within there, you were essentially calling a new method. By the time your event handler is called, the method is out of scope and you're in the scope of the original AEC. The only way to get a reference to the created AEC is to hold onto it when you create it. Although, I believe it will already be invalidated by then so you can't do anything with it.
|
|
|
|
 |
|
 |
Hello,
i have some questions in the databinding.
in the xaml, i defined a listview nested an commbobox and a button.
<Grid Height="Auto" Width="Auto">
<ListView Name="listview1" Margin="0,0,0,29">
<ListView.View>
<GridView x:Name="testGridviw">
<GridViewColumn Header="Index" DisplayMemberBinding="{Binding Path=Index}"/>
<GridViewColumn Header="Databse" >
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox Name="testcombobox" Width="200" SourceUpdated="testcombobox_SourceUpdated"
ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Window1}}, Path=EducationTypes}"
SelectionChanged="comboBoxInWnd_SelectionChanged">
</ComboBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
<Button Height="23" HorizontalAlignment="Right" Margin="0,0,62,0" Name="button1" VerticalAlignment="Bottom" Width="75" Click="button1_Click">show result</Button>
in the xaml.cs, my codes write as:
public Window1()
{
InitializeComponent();
InitializeDatabase();
this.listview1.ItemsSource = persons;
}
public BindingList<Person> persons = new BindingList<Person>();
public BindingList<Person> Persons
{
get
{
return persons;
}
}
public List<String> types = new List<String>();
public List<String> EducationTypes
{
get
{
return types;
}
}
private void InitializeDatabase()
{
types.Add("A");
types.Add("BB");
types.Add("CCC");
types.Add("DDDD");
types.Add("EEEEE");
types.Add("F");
for(int i = 0; i < 6; i++)
{
persons.Add(new Person(i, types[i]));
}
}
private void comboBoxInWnd_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ComboBox box = sender as ComboBox;
textBox1.Text = box.Text;
}
private void button1_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show(persons[0].Name);
MessageBox.Show(persons[1].Name);
}
</pre>
and the class Person writes as:
public class Person : INotifyPropertyChanged
{
public Person(int index, String name)
{
this.index = index;
this.m_name = name;
}
private int index;
/// <summary>
/// Index
/// </summary>
public int Index
{
get
{
return index;
}
set
{
if (index != value)
{
index = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Index"));
}
}
}
}
private string m_name;
/// <summary>
/// Name
/// </summary>
public string Name
{
get
{
return m_name;
}
set
{
if (m_name != value)
{
m_name = value;
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("Name"));
}
}
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
#endregion
}
and when i run the program ,in the right of the list view ,there are a group of comboboxes, and when i change the commbox's text,and click the button , as the "MessageBox.Show(persons[0].Name);
MessageBox.Show(persons[1].Name);" showed.
i thought the Name of the current person would be changed.
but actually,it didn't work as i thought.
so where the key was and how can i solve the problem?
thanks a lot anyway!
modified on Sunday, July 5, 2009 7:28 AM
|
|
|
|
 |
|
 |
Your code is incomplete. The function comboBoxInWnd_SelectionChanged makes reference to a textBox1 which isn't defined in your XAML. Also your XAML makes reference to a function called testcombobox_SourceUpdated that isn't in your code behind.
Looking at the code, you're never changing the Name of the person to which you're binding. The simplest route to enable your scenario is to make a UserControl that handles selecting the person based on the selected combobox value. Then you can use that UserControl in your datatemplate.
|
|
|
|
 |
|
 |
Thanks for your answer, but i still got bothered when i defined a usercontrol named "my combobox". as you see, the combobox's Name list (calls Names) is from the Person's Name collection, i didn't know Names after i create a list of Persons. How could i implement this method?
Hope for your answer.
|
|
|
|
 |