Run another server action without using app connect

Can I run another server action from within server connect without using app connect?

No, you can’t do that.
Why not just add this other server action steps in the first one?
What are you trying to achieve?

Just asking if it is possible. Now I know. Thanks.

Well what’s the point of doing that?
There must be something specific you want to achieve, which probably can be done in a more appropriate way :slight_smile:

Let say I have another server connect to run on error or on invalid using app connect. I just wonder if I can do it directly from within server connect, catch.

For example, sometimes my server refuses smtp connection and there’ll be error 200 or 500. I can resend the email using app connect > dynamic event > on error / invalid. I wonder if something like this can be done on server side alone without a trigger from client side.

I know I can just add another action step, but let say I have a standard Server Action mailer, I want to use this particular SA for many other SAs as well.

Well that’s why there are the “catch” steps :slight_smile:

So in the catch steps you add what you need to happen on server error.

I can run action step on catch :ok_hand:, but I can not run another Action File on catch :no_entry_sign:. Sorry I think that’s about my original question.

I already explained you that:

And already explained you how to achieve what you need :slight_smile:

Yeah that’s clear. Thanks.

I get where you are coming from transcoderm, would allow development of reusable/ callable server connect code modules.

I found myself wanting to do that to monitor error situations so that a server action would send an email to me if a server action failed.

Rather than using the catch option, i wrote a separate server Action (with get parameters to record logging info), I the made a ‘no auto load’ server connection to it in app connect then triggered it with server.load in the server connect error event withing Dynamic Events.

I also use this technique for audit trailing via the success event

1 Like

That’s the way to go Brian - but it requires App Connect to run the second action.
@transcoderm wants to do this, without App Connect :slight_smile:

We will consider adding such an option (running another server action from a server action) we just have to discuss it with the team :slight_smile:

1 Like

True, just offering a workable alternative as it can’t currently be done.

1 Like

Also, for such things as auditing, storing logs or stuff that require data from the page, you always need a page with app connect which triggers the server action. Otherwise you won’t be able to collect the data from that page.

Yes I agree, the ability to send diagnostic/ audit data via $_GET parameters withing a dynamic event action is incredibly powerful and I suspect may be less flexible at Server Connect level

I prefer adding log insert step for every Action File rather than having separate action file for audit trail purpose. The reason is I can get all the data easier with lesser steps, and having lesser code on my main page. But I agree with you that $_GET variable is a good tool to utilise. I use it for delete and simple update actions without having to use a form.

It is good to hear @Teodor will talk to the team to consider adding option to run another server action from a server action. Would make server connect even more powerful than it is now.

Cheers.

1 Like